Lots of minor polish items

pull/14/head
Sam Bosley 12 years ago
parent 889c6ad5f3
commit b130fd2c80

@ -70,7 +70,7 @@ public class TagSettingsActivity extends FragmentActivity {
public static final int REQUEST_ACTFM_LOGIN = 3;
public static final String TOKEN_AUTOPOPULATE_MEMBERS = "autopopulateMembers"; //$NON-NLS-1$
public static final String TOKEN_AUTOPOPULATE_NAME = "autopopulateName"; //$NON-NLS-1$
private static final String MEMBERS_IN_PROGRESS = "members"; //$NON-NLS-1$
@ -232,7 +232,7 @@ public class TagSettingsActivity extends FragmentActivity {
updateMembers(autopopulateMembers);
getIntent().removeExtra(TOKEN_AUTOPOPULATE_MEMBERS);
}
String autopopulateName = getIntent().getStringExtra(TOKEN_AUTOPOPULATE_NAME);
if (!TextUtils.isEmpty(autopopulateName)) {
tagName.setText(autopopulateName);
@ -493,11 +493,11 @@ public class TagSettingsActivity extends FragmentActivity {
public boolean onCreateOptionsMenu(Menu menu) {
MenuItem item;
item = menu.add(Menu.NONE, MENU_DISCARD_ID, 0, R.string.TEA_menu_discard);
item.setIcon(R.drawable.ic_menu_close);
item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_close));
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
item = menu.add(Menu.NONE, MENU_SAVE_ID, 0, R.string.TEA_menu_save);
item.setIcon(R.drawable.ic_menu_save);
item.setIcon(ThemeService.getDrawable(R.drawable.ic_menu_save));
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return super.onCreateOptionsMenu(menu);
}

@ -24,7 +24,7 @@
<string name="repeat_interval_prompt">Repeat Interval</string>
<!-- slide 19b-->
<string name="repeat_never">Make repeating?</string>
<string name="repeat_never">Repeating?</string>
<!-- slide 20f-->
<string name="repeat_dont">Don\'t repeat</string>

@ -14,7 +14,7 @@
<string name="TEA_tags_label">Lists</string>
<!-- Tags label long version -->
<string name="TEA_tags_label_long">Put task on one or more lists</string>
<string name="TEA_tags_label_long">Add to lists</string>
<!-- slide 16h: Tags none -->
<string name="TEA_tags_none">None</string>

@ -17,7 +17,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.ActionBar;
import android.support.v4.app.Fragment;
@ -192,7 +191,7 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
personStatus = (TextView) actionBar.getCustomView().findViewById(R.id.person_image);
commentsButton = (Button) actionBar.getCustomView().findViewById(R.id.comments);
if (ThemeService.getUnsimplifiedTheme() == R.style.Theme_White_Alt)
commentsButton.setTextColor(Color.BLACK);
commentsButton.setTextColor(getResources().getColor(R.color.blue_theme_color));
initializeFragments(actionBar);
createMainMenuPopover();

@ -6,10 +6,12 @@
package com.todoroo.astrid.helper;
import android.app.Activity;
import android.content.res.ColorStateList;
import android.content.res.Resources.Theme;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import com.timsu.astrid.R;
import com.todoroo.astrid.data.Task;
@ -94,11 +96,21 @@ public abstract class TaskEditControlSet {
* Sets up ok button background. Subclasses can override to customize look and feel
*/
protected void setupOkButton(View view) {
View ok = view.findViewById(R.id.edit_dlg_ok);
Button ok = (Button) view.findViewById(R.id.edit_dlg_ok);
Theme theme = activity.getTheme();
TypedValue themeColor = new TypedValue();
theme.resolveAttribute(R.attr.asThemeTextColor, themeColor, false);
if (ok != null)
TypedValue inverseColor = new TypedValue();
theme.resolveAttribute(R.attr.asTextColorInverse, inverseColor, false);
if (ok != null) {
ok.setBackgroundDrawable(EditDialogOkBackground.getBg(activity.getResources().getColor(themeColor.data)));
int[][] states = new int[2][];
states[0] = new int[] { android.R.attr.state_pressed };
states[1] = new int[] { android.R.attr.state_enabled };
int[] colors = new int[] { inverseColor.data, activity.getResources().getColor(themeColor.data) };
ColorStateList csl = new ColorStateList(states, colors);
ok.setTextColor(csl);
}
}
}

Loading…
Cancel
Save