Improve text style consistency

pull/413/head
Alex Baker 9 years ago
parent 5ac2db645f
commit 726fb9a64c

@ -72,6 +72,7 @@ import timber.log.Timber;
import static com.google.common.collect.Iterables.filter; import static com.google.common.collect.Iterables.filter;
import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Lists.transform; import static com.google.common.collect.Lists.transform;
import static org.tasks.preferences.ResourceResolver.getData;
/** /**
* Adapter for displaying a user's tasks as a list * Adapter for displaying a user's tasks as a list
@ -140,6 +141,11 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
private final Map<String, TagData> tagMap = new HashMap<>(); private final Map<String, TagData> tagMap = new HashMap<>();
private final int textColorPrimary;
private final int textColorSecondary;
private final int textColorHint;
private final int textColorOverdue;
public TaskAdapter(Context context, Preferences preferences, TaskAttachmentDao taskAttachmentDao, TaskService taskService, TaskListFragment fragment, public TaskAdapter(Context context, Preferences preferences, TaskAttachmentDao taskAttachmentDao, TaskService taskService, TaskListFragment fragment,
Cursor c, AtomicReference<String> query, OnCompletedTaskListener onCompletedTaskListener, Cursor c, AtomicReference<String> query, OnCompletedTaskListener onCompletedTaskListener,
DialogBuilder dialogBuilder, CheckBoxes checkBoxes, TagService tagService, ThemeCache themeCache) { DialogBuilder dialogBuilder, CheckBoxes checkBoxes, TagService tagService, ThemeCache themeCache) {
@ -167,6 +173,11 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
displayMetrics = new DisplayMetrics(); displayMetrics = new DisplayMetrics();
fragment.getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); fragment.getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
textColorPrimary = getData(context, android.R.attr.textColorPrimary);
textColorSecondary = getData(context, android.R.attr.textColorSecondary);
textColorHint = getData(context, android.R.attr.textColorTertiary);
textColorOverdue = resources.getColor(R.color.overdue);
updateTagMap(); updateTagMap();
this.minRowHeight = computeMinRowHeight(); this.minRowHeight = computeMinRowHeight();
} }
@ -472,11 +483,11 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
TextView name = viewHolder.nameView; TextView name = viewHolder.nameView;
if(state) { if(state) {
name.setTextColor(textColorHint);
name.setPaintFlags(name.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); name.setPaintFlags(name.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
name.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemTitle_Completed);
} else { } else {
name.setTextColor(textColorPrimary);
name.setPaintFlags(name.getPaintFlags() & ~Paint.STRIKE_THRU_TEXT_FLAG); name.setPaintFlags(name.getPaintFlags() & ~Paint.STRIKE_THRU_TEXT_FLAG);
name.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemTitle);
} }
name.setTextSize(fontSize); name.setTextSize(fontSize);
@ -564,9 +575,9 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
if(!task.isCompleted() && task.hasDueDate()) { if(!task.isCompleted() && task.hasDueDate()) {
long dueDate = task.getDueDate(); long dueDate = task.getDueDate();
if(task.isOverdue()) { if(task.isOverdue()) {
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDueDate_Overdue); dueDateView.setTextColor(textColorOverdue);
} else { } else {
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDueDate); dueDateView.setTextColor(textColorSecondary);
} }
String dateValue = DateUtilities.getRelativeDateStringWithTime(context, dueDate); String dateValue = DateUtilities.getRelativeDateStringWithTime(context, dueDate);
dueDateView.setText(dateValue); dueDateView.setText(dateValue);
@ -574,7 +585,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
} else if(task.isCompleted()) { } else if(task.isCompleted()) {
String dateValue = DateUtilities.getRelativeDateStringWithTime(context, task.getCompletionDate()); String dateValue = DateUtilities.getRelativeDateStringWithTime(context, task.getCompletionDate());
dueDateView.setText(resources.getString(R.string.TAd_completed, dateValue)); dueDateView.setText(resources.getString(R.string.TAd_completed, dateValue));
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDueDate_Completed); dueDateView.setTextColor(textColorHint);
dueDateView.setVisibility(View.VISIBLE); dueDateView.setVisibility(View.VISIBLE);
} else { } else {
dueDateView.setVisibility(View.GONE); dueDateView.setVisibility(View.GONE);

@ -470,11 +470,11 @@ public class RepeatControlSet extends TaskEditControlFragment {
protected void refreshDisplayView() { protected void refreshDisplayView() {
if (doRepeat) { if (doRepeat) {
displayView.setText(getRepeatString()); displayView.setText(getRepeatString());
displayView.setAlpha(1.0f); displayView.setTextColor(theme.getThemeBase().getTextColorPrimary());
clear.setVisibility(View.VISIBLE); clear.setVisibility(View.VISIBLE);
} else { } else {
displayView.setAlpha(0.5f);
displayView.setText(R.string.repeat_never); displayView.setText(R.string.repeat_never);
displayView.setTextColor(theme.getThemeBase().getTextColorTertiary());
clear.setVisibility(View.GONE); clear.setVisibility(View.GONE);
} }
} }

@ -377,10 +377,8 @@ public final class TagsControlSet extends TaskEditControlFragment {
CharSequence tagString = buildTagString(); CharSequence tagString = buildTagString();
if (TextUtils.isEmpty(tagString)) { if (TextUtils.isEmpty(tagString)) {
tagsDisplay.setText(R.string.tag_FEx_untagged); tagsDisplay.setText(R.string.tag_FEx_untagged);
tagsDisplay.setAlpha(0.5f);
} else { } else {
tagsDisplay.setText(tagString); tagsDisplay.setText(tagString);
tagsDisplay.setAlpha(1.0f);
} }
} }

@ -221,10 +221,10 @@ public class TimerControlSet extends TaskEditControlFragment {
if (!TextUtils.isEmpty(toDisplay)) { if (!TextUtils.isEmpty(toDisplay)) {
displayEdit.setText(toDisplay); displayEdit.setText(toDisplay);
displayEdit.setAlpha(1.0f); displayEdit.setTextColor(theme.getThemeBase().getTextColorPrimary());
} else { } else {
displayEdit.setText(R.string.TEA_timer_controls); displayEdit.setText(R.string.TEA_timer_controls);
displayEdit.setAlpha(0.5f); displayEdit.setTextColor(theme.getThemeBase().getTextColorTertiary());
} }
} }

@ -28,6 +28,7 @@ import org.tasks.activities.DateAndTimePickerActivity;
import org.tasks.activities.TimePickerActivity; import org.tasks.activities.TimePickerActivity;
import org.tasks.injection.ForActivity; import org.tasks.injection.ForActivity;
import org.tasks.injection.FragmentComponent; import org.tasks.injection.FragmentComponent;
import org.tasks.themes.ThemeBase;
import org.tasks.time.DateTime; import org.tasks.time.DateTime;
import org.tasks.ui.HiddenTopArrayAdapter; import org.tasks.ui.HiddenTopArrayAdapter;
import org.tasks.ui.TaskEditControlFragment; import org.tasks.ui.TaskEditControlFragment;
@ -61,6 +62,7 @@ public class HideUntilControlSet extends TaskEditControlFragment implements OnIt
private static final int REQUEST_HIDE_UNTIL = 11011; private static final int REQUEST_HIDE_UNTIL = 11011;
@Inject @ForActivity Context context; @Inject @ForActivity Context context;
@Inject ThemeBase themeBase;
//private final CheckBox enabled; //private final CheckBox enabled;
@BindView(R.id.hideUntil) Spinner spinner; @BindView(R.id.hideUntil) Spinner spinner;
@ -99,12 +101,14 @@ public class HideUntilControlSet extends TaskEditControlFragment implements OnIt
if (value.setting == Task.HIDE_UNTIL_NONE) { if (value.setting == Task.HIDE_UNTIL_NONE) {
clearButton.setVisibility(View.GONE); clearButton.setVisibility(View.GONE);
tv.setText(value.label); tv.setText(value.label);
tv.setTextColor(themeBase.getTextColorTertiary());
} else { } else {
String display = value.label; String display = value.label;
if (value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY && value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY_TIME) { if (value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY && value.setting != Task.HIDE_UNTIL_SPECIFIC_DAY_TIME) {
display = display.toLowerCase(); display = display.toLowerCase();
} }
tv.setText(getString(R.string.TEA_hideUntil_display, display)); tv.setText(getString(R.string.TEA_hideUntil_display, display));
tv.setTextColor(themeBase.getTextColorPrimary());
} }
return tv; return tv;
} }
@ -307,12 +311,8 @@ public class HideUntilControlSet extends TaskEditControlFragment implements OnIt
private void refreshDisplayView() { private void refreshDisplayView() {
selectedValue = adapter.getItem(selection); selectedValue = adapter.getItem(selection);
if (selectedValue.setting == Task.HIDE_UNTIL_NONE) { clearButton.setVisibility(selectedValue.setting == Task.HIDE_UNTIL_NONE
spinner.setAlpha(0.5f); ? View.GONE
clearButton.setVisibility(View.GONE); : View.VISIBLE);
} else {
spinner.setAlpha(1.0f);
clearButton.setVisibility(View.VISIBLE);
}
} }
} }

@ -16,14 +16,22 @@ public class ThemeBase {
private final String name; private final String name;
private final int index; private final int index;
private final int textColorPrimary;
private final int textColorSecondary;
private final int textColorTertiary;
private final int style; private final int style;
private final int dialogStyle; private final int dialogStyle;
private final int contentBackground; private final int contentBackground;
private final int textColor; private final int textColor;
public ThemeBase(String name, int index, int dialogStyle, int contentBackground, int textColor) { public ThemeBase(String name, int index, int dialogStyle, int contentBackground,
int textColor, int textColorPrimary, int textColorSecondary,
int textColorTertiary) {
this.name = name; this.name = name;
this.index = index; this.index = index;
this.textColorPrimary = textColorPrimary;
this.textColorSecondary = textColorSecondary;
this.textColorTertiary = textColorTertiary;
this.style = THEMES[index]; this.style = THEMES[index];
this.dialogStyle = dialogStyle; this.dialogStyle = dialogStyle;
this.contentBackground = contentBackground; this.contentBackground = contentBackground;
@ -61,4 +69,16 @@ public class ThemeBase {
public void set(Activity activity) { public void set(Activity activity) {
activity.setTheme(style); activity.setTheme(style);
} }
public int getTextColorPrimary() {
return textColorPrimary;
}
public int getTextColorSecondary() {
return textColorSecondary;
}
public int getTextColorTertiary() {
return textColorTertiary;
}
} }

@ -26,7 +26,10 @@ public class ThemeCache {
i, i,
resolveAttribute(theme, R.attr.alertDialogTheme), resolveAttribute(theme, R.attr.alertDialogTheme),
resolveAttribute(theme, R.attr.asContentBackground), resolveAttribute(theme, R.attr.asContentBackground),
resolveAttribute(theme, R.attr.asTextColor))); resolveAttribute(theme, R.attr.asTextColor),
resolveAttribute(theme, android.R.attr.textColorPrimary),
resolveAttribute(theme, android.R.attr.textColorSecondary),
resolveAttribute(theme, android.R.attr.textColorTertiary)));
} }
String[] colorNames = resources.getStringArray(R.array.colors); String[] colorNames = resources.getStringArray(R.array.colors);
for (int i = 0 ; i < ThemeColor.COLORS.length ; i++) { for (int i = 0 ; i < ThemeColor.COLORS.length ; i++) {

@ -33,6 +33,7 @@ import org.tasks.injection.FragmentComponent;
import org.tasks.preferences.FragmentPermissionRequestor; import org.tasks.preferences.FragmentPermissionRequestor;
import org.tasks.preferences.PermissionChecker; import org.tasks.preferences.PermissionChecker;
import org.tasks.preferences.Preferences; import org.tasks.preferences.Preferences;
import org.tasks.themes.ThemeBase;
import javax.inject.Inject; import javax.inject.Inject;
@ -65,6 +66,7 @@ public class CalendarControlSet extends TaskEditControlFragment {
@Inject FragmentPermissionRequestor permissionRequestor; @Inject FragmentPermissionRequestor permissionRequestor;
@Inject Tracker tracker; @Inject Tracker tracker;
@Inject DialogBuilder dialogBuilder; @Inject DialogBuilder dialogBuilder;
@Inject ThemeBase themeBase;
private String calendarId; private String calendarId;
private String calendarName; private String calendarName;
@ -301,16 +303,16 @@ public class CalendarControlSet extends TaskEditControlFragment {
private void refreshDisplayView() { private void refreshDisplayView() {
if (!Strings.isNullOrEmpty(eventUri)) { if (!Strings.isNullOrEmpty(eventUri)) {
calendar.setAlpha(1.0f);
calendar.setText(R.string.gcal_TEA_showCalendar_label); calendar.setText(R.string.gcal_TEA_showCalendar_label);
calendar.setTextColor(themeBase.getTextColorPrimary());
cancelButton.setVisibility(View.VISIBLE); cancelButton.setVisibility(View.VISIBLE);
} else if (calendarName != null) { } else if (calendarName != null) {
calendar.setAlpha(1.0f);
calendar.setText(calendarName); calendar.setText(calendarName);
calendar.setTextColor(themeBase.getTextColorPrimary());
cancelButton.setVisibility(View.VISIBLE); cancelButton.setVisibility(View.VISIBLE);
} else { } else {
calendar.setAlpha(0.5f);
calendar.setText(R.string.gcal_TEA_addToCalendar_label); calendar.setText(R.string.gcal_TEA_addToCalendar_label);
calendar.setTextColor(themeBase.getTextColorTertiary());
cancelButton.setVisibility(View.GONE); cancelButton.setVisibility(View.GONE);
} }
} }

@ -24,6 +24,7 @@ import org.tasks.activities.TimePickerActivity;
import org.tasks.injection.ForActivity; import org.tasks.injection.ForActivity;
import org.tasks.injection.FragmentComponent; import org.tasks.injection.FragmentComponent;
import org.tasks.preferences.Preferences; import org.tasks.preferences.Preferences;
import org.tasks.themes.ThemeBase;
import org.tasks.time.DateTime; import org.tasks.time.DateTime;
import java.util.ArrayList; import java.util.ArrayList;
@ -66,6 +67,7 @@ public class DeadlineControlSet extends TaskEditControlFragment {
@Inject Preferences preferences; @Inject Preferences preferences;
@Inject @ForActivity Context context; @Inject @ForActivity Context context;
@Inject ThemeBase themeBase;
@BindView(R.id.due_date) Spinner dueDateSpinner; @BindView(R.id.due_date) Spinner dueDateSpinner;
@BindView(R.id.due_time) Spinner dueTimeSpinner; @BindView(R.id.due_time) Spinner dueTimeSpinner;
@ -127,7 +129,6 @@ public class DeadlineControlSet extends TaskEditControlFragment {
date = savedInstanceState.getLong(EXTRA_DATE); date = savedInstanceState.getLong(EXTRA_DATE);
time = savedInstanceState.getInt(EXTRA_TIME); time = savedInstanceState.getInt(EXTRA_TIME);
} }
final int themeColor = getData(context, R.attr.asTextColor);
final int overdueColor = context.getResources().getColor(R.color.overdue); final int overdueColor = context.getResources().getColor(R.color.overdue);
dueDateAdapter = new HiddenTopArrayAdapter<String>(context, android.R.layout.simple_spinner_item, dueDateOptions) { dueDateAdapter = new HiddenTopArrayAdapter<String>(context, android.R.layout.simple_spinner_item, dueDateOptions) {
@Override @Override
@ -138,19 +139,16 @@ public class DeadlineControlSet extends TaskEditControlFragment {
} }
TextView tv = (TextView) inflater.inflate(android.R.layout.simple_spinner_item, parent, false); TextView tv = (TextView) inflater.inflate(android.R.layout.simple_spinner_item, parent, false);
tv.setText(dueDateOptions.get(selectedItemPosition)); tv.setText(dueDateOptions.get(selectedItemPosition));
int textColor;
if (date == 0) { if (date == 0) {
dueDateSpinner.setAlpha(0.5f); textColor = themeBase.getTextColorTertiary();
dueDateSpinner.setBackgroundDrawable(getUnderline(themeColor)); } else if (date < newDateTime().startOfDay().getMillis()) {
textColor = overdueColor;
} else { } else {
dueDateSpinner.setAlpha(1.0f); textColor = themeBase.getTextColorPrimary();
if (date < newDateTime().startOfDay().getMillis()) {
dueDateSpinner.setBackgroundDrawable(getUnderline(overdueColor));
tv.setTextColor(overdueColor);
} else {
dueDateSpinner.setBackgroundDrawable(getUnderline(themeColor));
tv.setTextColor(themeColor);
}
} }
dueDateSpinner.setBackgroundDrawable(getUnderline(textColor));
tv.setTextColor(textColor);
return tv; return tv;
} }
}; };
@ -165,19 +163,16 @@ public class DeadlineControlSet extends TaskEditControlFragment {
} }
TextView tv = (TextView) inflater.inflate(android.R.layout.simple_spinner_item, parent, false); TextView tv = (TextView) inflater.inflate(android.R.layout.simple_spinner_item, parent, false);
tv.setText(dueTimeOptions.get(selectedItemPosition)); tv.setText(dueTimeOptions.get(selectedItemPosition));
int textColor;
if (time == -1) { if (time == -1) {
dueTimeSpinner.setAlpha(0.5f); textColor = themeBase.getTextColorTertiary();
dueTimeSpinner.setBackgroundDrawable(getUnderline(themeColor)); } else if (newDateTime(date).withMillisOfDay(time).isBeforeNow()) {
textColor = overdueColor;
} else { } else {
dueTimeSpinner.setAlpha(1.0f); textColor = themeBase.getTextColorPrimary();
if (newDateTime(date).withMillisOfDay(time).isBeforeNow()) {
dueTimeSpinner.setBackgroundDrawable(getUnderline(overdueColor));
tv.setTextColor(overdueColor);
} else {
dueTimeSpinner.setBackgroundDrawable(getUnderline(themeColor));
tv.setTextColor(themeColor);
}
} }
tv.setTextColor(textColor);
dueTimeSpinner.setBackgroundDrawable(getUnderline(textColor));
return tv; return tv;
} }
}; };

@ -13,7 +13,7 @@
android:layout_weight="100"> android:layout_weight="100">
<TextView <TextView
style="@android:style/TextAppearance" style="@style/TaskEditTextPrimary"
android:id="@+id/alarm_string" android:id="@+id/alarm_string"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

@ -24,11 +24,10 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:textColor="?android:attr/textColorPrimary"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:paddingLeft="5dip" android:paddingLeft="5dip"
android:paddingRight="3dip" android:paddingRight="3dip"
style="@style/TextAppearance.TAd_ItemTitle"
android:textColor="?attr/asTextColor"
android:textSize="16sp"/> android:textSize="16sp"/>
@ -40,7 +39,7 @@
android:layout_alignLeft="@id/title" android:layout_alignLeft="@id/title"
android:layout_marginLeft="5dip" android:layout_marginLeft="5dip"
android:paddingTop="1dip" android:paddingTop="1dip"
style="@style/TextAppearance.TAd_ItemDueDate" android:textColor="?android:attr/textColorSecondary"
android:textStyle="normal" android:textStyle="normal"
android:gravity="left" android:gravity="left"
android:ellipsize="end" android:ellipsize="end"

@ -1,16 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android="http://schemas.android.com/apk/res/android" <EditText xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/notes" android:id="@+id/notes"
style="@style/TaskEditTextPrimary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="@dimen/keyline_second" android:background="@android:color/transparent"
android:paddingEnd="@dimen/keyline_second" android:freezesText="true"
android:scrollbars="vertical"
android:hint="@string/TEA_note_label" android:hint="@string/TEA_note_label"
android:textColorHint="?attr/asTextColorHint"
android:textSize="@dimen/task_edit_text_size"
android:inputType="textCapSentences|textMultiLine"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:textColor="?attr/asTextColor" android:inputType="textCapSentences|textMultiLine"
android:freezesText="true" android:paddingEnd="@dimen/keyline_first"
android:background="@android:color/transparent" /> android:paddingRight="@dimen/keyline_first"
android:scrollbars="vertical" />

@ -23,12 +23,11 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
style="@style/TaskEditTextHint"
android:id="@+id/add_attachment" android:id="@+id/add_attachment"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/add_attachment" android:text="@string/add_attachment"/>
android:textColor="?attr/asTextColorHint"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout> </LinearLayout>

@ -16,12 +16,11 @@
<TextView <TextView
android:id="@+id/calendar_display_which" android:id="@+id/calendar_display_which"
style="@style/TaskEditTextPrimary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top" android:layout_gravity="top"
android:gravity="start" android:gravity="start"/>
android:textColor="?attr/asTextColor"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout> </LinearLayout>

@ -1,29 +1,9 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
** Copyright (c) 2012 Todoroo Inc <TextView xmlns:android="http://schemas.android.com/apk/res/android"
** android:id="@+id/google_task_list"
** See the file "LICENSE" for the full license governing this code. style="@style/TaskEditTextPrimary"
--> android:layout_width="match_parent"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:layout_gravity="top"
android:gravity="start"
<LinearLayout android:text="@string/default_value" />
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="100">
<TextView
android:id="@+id/google_task_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:text="@string/default_value"
android:gravity="start"
android:textColor="?attr/asTextColor"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout>
</LinearLayout>

@ -6,15 +6,13 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/display_row_edit" style="@style/TaskEditTextPrimary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="start|center_vertical" android:gravity="start|center_vertical"
android:paddingEnd="@dimen/keyline_second" android:paddingEnd="@dimen/keyline_second"
android:paddingRight="@dimen/keyline_second" android:paddingRight="@dimen/keyline_second"
android:text="@string/TEA_importance_label" android:text="@string/TEA_importance_label" />
android:textColor="?attr/asTextColor"
android:textSize="@dimen/task_edit_text_size" />
<RadioGroup <RadioGroup
android:layout_width="match_parent" android:layout_width="match_parent"
@ -27,23 +25,23 @@
<android.support.v7.widget.AppCompatRadioButton <android.support.v7.widget.AppCompatRadioButton
android:id="@+id/priority_none" android:id="@+id/priority_none"
android:buttonTint="@color/importance_4" style="@style/priority_button"
style="@style/priority_button"/> android:buttonTint="@color/importance_4" />
<android.support.v7.widget.AppCompatRadioButton <android.support.v7.widget.AppCompatRadioButton
android:id="@+id/priority_low" android:id="@+id/priority_low"
android:buttonTint="@color/importance_3" style="@style/priority_button"
style="@style/priority_button"/> android:buttonTint="@color/importance_3" />
<android.support.v7.widget.AppCompatRadioButton <android.support.v7.widget.AppCompatRadioButton
android:id="@+id/priority_medium" android:id="@+id/priority_medium"
android:buttonTint="@color/importance_2" style="@style/priority_button"
style="@style/priority_button"/> android:buttonTint="@color/importance_2" />
<android.support.v7.widget.AppCompatRadioButton <android.support.v7.widget.AppCompatRadioButton
android:id="@+id/priority_high" android:id="@+id/priority_high"
android:buttonTint="@color/importance_1" style="@style/priority_button"
style="@style/priority_button"/> android:buttonTint="@color/importance_1" />
</RadioGroup> </RadioGroup>
</LinearLayout> </LinearLayout>

@ -28,12 +28,11 @@
android:layout_weight="50"> android:layout_weight="50">
<TextView <TextView
android:textSize="@dimen/task_edit_text_size" style="@style/TaskEditTextHint"
android:id="@+id/alarms_add" android:id="@+id/alarms_add"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/add_reminder" android:text="@string/add_reminder"/>
android:textColor="?attr/asTextColorHint" />
<Spinner <Spinner
android:id="@+id/alarms_add_spinner" android:id="@+id/alarms_add_spinner"

@ -16,12 +16,11 @@
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
style="@style/TaskEditTextPrimary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top" android:layout_gravity="top"
android:gravity="start" android:gravity="start"/>
android:textColor="?attr/asTextColor"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout> </LinearLayout>

@ -4,9 +4,8 @@
** See the file "LICENSE" for the full license governing this code. ** See the file "LICENSE" for the full license governing this code.
--> -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/TaskEditTextHint"
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top" android:layout_gravity="top" />
android:textColor="?attr/asTextColor"
android:textSize="@dimen/task_edit_text_size" />

@ -16,12 +16,10 @@
<TextView <TextView
android:id="@+id/display_row_edit" android:id="@+id/display_row_edit"
style="@style/TaskEditTextPrimary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?attr/asTextColor" android:text="@string/TEA_timer_controls" />
android:text="@string/TEA_timer_controls"
android:alpha="?attr/alpha_secondary"
android:textSize="@dimen/task_edit_text_size" />
</LinearLayout> </LinearLayout>
@ -50,8 +48,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:textColor="?attr/asTextColor" android:textColor="?android:attr/textColorSecondary"
android:alpha="?attr/alpha_secondary"
android:textSize="10sp" android:textSize="10sp"
android:visibility="visible" /> android:visibility="visible" />
</LinearLayout> </LinearLayout>

@ -10,7 +10,6 @@
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:alpha="?attr/alpha_secondary"
android:fontFamily="@string/font_fontFamily_medium" android:fontFamily="@string/font_fontFamily_medium"
android:gravity="center_vertical|end" android:gravity="center_vertical|end"
android:minEms="3" android:minEms="3"
@ -18,7 +17,7 @@
android:paddingLeft="@dimen/keyline_first" android:paddingLeft="@dimen/keyline_first"
android:paddingRight="@dimen/keyline_first" android:paddingRight="@dimen/keyline_first"
android:paddingStart="@dimen/keyline_first" android:paddingStart="@dimen/keyline_first"
android:textColor="?attr/asTextColor" /> android:textColor="?android:attr/textColorSecondary" />
<LinearLayout <LinearLayout
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -44,14 +43,13 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:alpha="?attr/alpha_primary"
android:checked="false" android:checked="false"
android:ellipsize="end" android:ellipsize="end"
android:fontFamily="@string/font_fontFamily_medium" android:fontFamily="@string/font_fontFamily_medium"
android:gravity="center_vertical" android:gravity="center_vertical"
android:lines="1" android:lines="1"
android:singleLine="true" android:singleLine="true"
android:textColor="?attr/asTextColor" android:textColor="?android:attr/textColorPrimary"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>

@ -25,9 +25,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:alpha="?attr/alpha_secondary"
android:text="@string/name" android:text="@string/name"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorSecondary"
android:textSize="18sp" /> android:textSize="18sp" />
<EditText <EditText
@ -60,9 +59,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:alpha="?attr/alpha_secondary"
android:text="@string/color" android:text="@string/color"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorSecondary"
android:textSize="18sp" /> android:textSize="18sp" />
<TextView <TextView
@ -72,7 +70,6 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_below="@id/theme_label" android:layout_below="@id/theme_label"
android:layout_marginTop="@dimen/keyline_first" android:layout_marginTop="@dimen/keyline_first"
android:alpha="?attr/alpha_primary"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textSize="18sp" /> android:textSize="18sp" />

@ -47,7 +47,6 @@
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
style="@style/TextAppearance.TAd_ItemTitle"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="100" android:layout_weight="100"
@ -108,8 +107,7 @@
android:maxLines="1" android:maxLines="1"
android:paddingEnd="@dimen/keyline_first" android:paddingEnd="@dimen/keyline_first"
android:paddingRight="@dimen/keyline_first" android:paddingRight="@dimen/keyline_first"
android:singleLine="true" android:singleLine="true" />
android:textColor="@android:color/white" />
</RelativeLayout> </RelativeLayout>

@ -28,9 +28,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:alpha="?attr/alpha_disabled"
android:text="@string/TLA_no_items" android:text="@string/TLA_no_items"
android:textColor="?attr/asTextColor" android:textColor="?android:attr/textColorTertiary"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>

@ -16,12 +16,10 @@
<attr name="overlay_theme" format="reference" /> <attr name="overlay_theme" format="reference" />
<attr name="actionBarPrimaryText" format="color" /> <attr name="actionBarPrimaryText" format="color" />
<attr name="actionBarSecondaryText" format="color" /> <attr name="actionBarSecondaryText" format="color" />
<attr name="dividerColor" format="color" />
<attr name="dark_status_bar" format="boolean" /> <attr name="dark_status_bar" format="boolean" />
<attr name="alpha_primary" format="dimension" />
<attr name="alpha_secondary" format="dimension" /> <attr name="alpha_secondary" format="dimension" />
<attr name="alpha_disabled" format="dimension" /> <attr name="alpha_disabled" format="dimension" />
<attr name="alpha_divider" format="dimension" />
<declare-styleable name="TimePreference"> <declare-styleable name="TimePreference">
<attr name="summary" format="string" /> <attr name="summary" format="string" />

@ -104,13 +104,15 @@
<color name="white_text_hint">#eee</color> <color name="white_text_hint">#eee</color>
<color name="black_text_hint">#535353</color> <color name="black_text_hint">#535353</color>
<color name="black_87">#df000000</color> <color name="black_87">#de000000</color>
<color name="black_54">#8c000000</color> <color name="black_54">#8a000000</color>
<color name="black_38">#60000000</color> <color name="black_38">#61000000</color>
<color name="black_12">#1e000000</color> <color name="black_12">#1f000000</color>
<color name="white_100">#ffffff</color> <color name="white_100">#ffffffff</color>
<color name="white_70">#b2ffffff</color> <color name="white_70">#b3ffffff</color>
<color name="white_50">#80ffffff</color>
<color name="white_12">#1fffffff</color>
<color name="importance_1">@color/red_500</color> <color name="importance_1">@color/red_500</color>
<color name="importance_2">@color/amber_500</color> <color name="importance_2">@color/amber_500</color>

@ -17,16 +17,12 @@
<item name="tag_characters" format="float" type="dimen">12</item> <item name="tag_characters" format="float" type="dimen">12</item>
<item name="alpha_primary_light" format="float" type="dimen">0.87</item>
<item name="alpha_secondary_light" format="float" type="dimen">0.54</item> <item name="alpha_secondary_light" format="float" type="dimen">0.54</item>
<item name="alpha_disabled_light" format="float" type="dimen">0.38</item> <item name="alpha_disabled_light" format="float" type="dimen">0.38</item>
<item name="alpha_primary_dark" format="float" type="dimen">1.0</item>
<item name="alpha_secondary_dark" format="float" type="dimen">0.70</item> <item name="alpha_secondary_dark" format="float" type="dimen">0.70</item>
<item name="alpha_disabled_dark" format="float" type="dimen">0.50</item> <item name="alpha_disabled_dark" format="float" type="dimen">0.50</item>
<item name="alpha_divider" format="float" type="dimen">0.12</item>
<dimen name="elevation_toolbar">8dp</dimen> <dimen name="elevation_toolbar">8dp</dimen>
<dimen name="elevation_task_list">6dp</dimen> <dimen name="elevation_task_list">6dp</dimen>
<dimen name="elevation_padding">0dp</dimen> <dimen name="elevation_padding">0dp</dimen>

@ -24,6 +24,16 @@
<item name="android:textColor">?attr/asTextColor</item> <item name="android:textColor">?attr/asTextColor</item>
</style> </style>
<style name="TaskEditTextPrimary">
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textColorHint">?android:attr/textColorTertiary</item>
<item name="android:textSize">@dimen/task_edit_text_size</item>
</style>
<style name="TaskEditTextHint" parent="TaskEditTextPrimary">
<item name="android:textColor">?android:attr/textColorTertiary</item>
</style>
<style name="WhiteToolbarTheme"> <style name="WhiteToolbarTheme">
<item name="dark_status_bar">false</item> <item name="dark_status_bar">false</item>
<item name="overlay_theme">@style/WhiteToolbarOverlay</item> <item name="overlay_theme">@style/WhiteToolbarOverlay</item>
@ -87,8 +97,7 @@
<style name="TaskListView" parent="ListView" /> <style name="TaskListView" parent="ListView" />
<style name="divider"> <style name="divider">
<item name="android:background">?android:attr/colorForeground</item> <item name="android:background">?attr/dividerColor</item>
<item name="android:alpha">?attr/alpha_divider</item>
</style> </style>
<style name="vertical_divider" parent="divider"> <style name="vertical_divider" parent="divider">
@ -111,26 +120,6 @@
<style name="task_list_container"/> <style name="task_list_container"/>
<style name="TextAppearance.TAd_ItemTitle"/>
<style name="TextAppearance.TAd_ItemTitle_Completed" parent="TextAppearance.TAd_ItemTitle">
<item name="android:textColor">?android:attr/textColorHint</item>
</style>
<style name="TextAppearance.TAd_ItemDetails"/>
<style name="TextAppearance.TAd_ItemDueDate" parent="TextAppearance.TAd_ItemDetails">
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
<style name="TextAppearance.TAd_ItemDueDate_Overdue" parent="TextAppearance.TAd_ItemDueDate">
<item name="android:textColor">@color/overdue</item>
</style>
<style name="TextAppearance.TAd_ItemDueDate_Completed" parent="TextAppearance.TAd_ItemDueDate">
<item name="android:textColor">?android:attr/textColorHint</item>
</style>
<style name="FilePickerTheme" parent="NNF_BaseTheme.Light"> <style name="FilePickerTheme" parent="NNF_BaseTheme.Light">
<item name="nnf_toolbarTheme">?attr/overlay_theme</item> <item name="nnf_toolbarTheme">?attr/overlay_theme</item>
</style> </style>

@ -8,16 +8,18 @@
<item name="drawer_background">@color/drawer_dark_background</item> <item name="drawer_background">@color/drawer_dark_background</item>
<item name="drawer_background_selected">@color/drawer_selected_dark</item> <item name="drawer_background_selected">@color/drawer_selected_dark</item>
<item name="asContentBackground">@color/md_dark_background</item> <item name="asContentBackground">@color/md_dark_background</item>
<item name="asTextColor">@android:color/white</item> <item name="asTextColor">@color/white_100</item>
<item name="asTextColorHint">@android:color/darker_gray</item> <item name="asTextColorHint">@color/white_50</item>
<item name="icon_tint">@android:color/white</item> <item name="icon_tint">@android:color/white</item>
<item name="android:spinnerItemStyle">@style/SpinnerNoPadding</item> <item name="android:spinnerItemStyle">@style/SpinnerNoPadding</item>
<item name="android:actionModeBackground">?attr/colorPrimary</item> <item name="android:actionModeBackground">?attr/colorPrimary</item>
<item name="alertDialogTheme">@style/DialogBaseDark</item> <item name="alertDialogTheme">@style/DialogBaseDark</item>
<item name="alpha_primary">@dimen/alpha_primary_dark</item>
<item name="alpha_secondary">@dimen/alpha_secondary_dark</item> <item name="alpha_secondary">@dimen/alpha_secondary_dark</item>
<item name="alpha_disabled">@dimen/alpha_disabled_dark</item> <item name="alpha_disabled">@dimen/alpha_disabled_dark</item>
<item name="alpha_divider">@dimen/alpha_divider</item> <item name="android:textColorPrimary">@color/white_100</item>
<item name="android:textColorSecondary">@color/white_70</item>
<item name="android:textColorTertiary">@color/white_50</item>
<item name="dividerColor">@color/white_12</item>
</style> </style>
<style name="DarkOverride" parent="DarkBase"> <style name="DarkOverride" parent="DarkBase">
@ -27,7 +29,7 @@
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item> <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item> <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowBackground">@color/dialog_dark_background</item> <item name="android:windowBackground">@color/dialog_dark_background</item>
<item name="asTextColor">@android:color/white</item> <item name="asTextColor">@color/white_100</item>
<item name="icon_tint">@android:color/white</item> <item name="icon_tint">@android:color/white</item>
</style> </style>

@ -8,16 +8,18 @@
<item name="drawer_background">@color/drawer_light_background</item> <item name="drawer_background">@color/drawer_light_background</item>
<item name="drawer_background_selected">@color/drawer_selected_light</item> <item name="drawer_background_selected">@color/drawer_selected_light</item>
<item name="asContentBackground">@color/md_light_background</item> <item name="asContentBackground">@color/md_light_background</item>
<item name="asTextColor">@android:color/black</item> <item name="asTextColor">@color/black_87</item>
<item name="asTextColorHint">@android:color/darker_gray</item> <item name="asTextColorHint">@color/black_38</item>
<item name="icon_tint">@android:color/black</item> <item name="icon_tint">@android:color/black</item>
<item name="android:spinnerItemStyle">@style/SpinnerNoPadding</item> <item name="android:spinnerItemStyle">@style/SpinnerNoPadding</item>
<item name="android:actionModeBackground">?attr/colorPrimary</item> <item name="android:actionModeBackground">?attr/colorPrimary</item>
<item name="alertDialogTheme">@style/LightDialogBase</item> <item name="alertDialogTheme">@style/LightDialogBase</item>
<item name="alpha_primary">@dimen/alpha_primary_light</item>
<item name="alpha_secondary">@dimen/alpha_secondary_light</item> <item name="alpha_secondary">@dimen/alpha_secondary_light</item>
<item name="alpha_disabled">@dimen/alpha_disabled_light</item> <item name="alpha_disabled">@dimen/alpha_disabled_light</item>
<item name="alpha_divider">@dimen/alpha_divider</item> <item name="android:textColorPrimary">@color/black_87</item>
<item name="android:textColorSecondary">@color/black_54</item>
<item name="android:textColorTertiary">@color/black_38</item>
<item name="dividerColor">@color/black_12</item>
</style> </style>
<style name="LightOverride" parent="LightBase"> <style name="LightOverride" parent="LightBase">
@ -27,7 +29,7 @@
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item> <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item> <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowBackground">@color/dialog_light_background</item> <item name="android:windowBackground">@color/dialog_light_background</item>
<item name="asTextColor">@android:color/black</item> <item name="asTextColor">@color/black_87</item>
<item name="icon_tint">@android:color/black</item> <item name="icon_tint">@android:color/black</item>
</style> </style>

Loading…
Cancel
Save