New text color logic for repeat and gcal control sets

pull/14/head
Sam Bosley 11 years ago
parent 94a710380e
commit 1be8194cef

@ -227,12 +227,14 @@ public class GCalControlSet extends PopupControlSet {
@Override @Override
protected void refreshDisplayView() { protected void refreshDisplayView() {
TextView calendar = (TextView) getDisplayView().findViewById(R.id.calendar_display_which); TextView calendar = (TextView) getDisplayView().findViewById(R.id.calendar_display_which);
calendar.setTextColor(themeColor);
if (initialized) { if (initialized) {
if (hasEvent) { if (hasEvent) {
calendar.setText(R.string.gcal_TEA_has_event); calendar.setText(R.string.gcal_TEA_has_event);
} else if (calendarSelector.getSelectedItemPosition() != 0) { } else if (calendarSelector.getSelectedItemPosition() != 0) {
calendar.setText((String)calendarSelector.getSelectedItem()); calendar.setText((String)calendarSelector.getSelectedItem());
} else { } else {
calendar.setTextColor(unsetColor);
calendar.setText(R.string.gcal_TEA_none_selected); calendar.setText(R.string.gcal_TEA_none_selected);
} }
} else { } else {
@ -242,6 +244,7 @@ public class GCalControlSet extends PopupControlSet {
} else if (index >= 0 && index < calendars.calendars.length) { } else if (index >= 0 && index < calendars.calendars.length) {
calendar.setText(calendars.calendars[index]); calendar.setText(calendars.calendars[index]);
} else { } else {
calendar.setTextColor(unsetColor);
calendar.setText(R.string.gcal_TEA_none_selected); calendar.setText(R.string.gcal_TEA_none_selected);
} }
} }

@ -407,8 +407,10 @@ public class RepeatControlSet extends PopupControlSet {
TypedValue repeatIcon = new TypedValue(); TypedValue repeatIcon = new TypedValue();
activity.getTheme().resolveAttribute(R.attr.asRepeatIcon, repeatIcon, false); activity.getTheme().resolveAttribute(R.attr.asRepeatIcon, repeatIcon, false);
repeatImage.setImageResource(repeatIcon.data); repeatImage.setImageResource(repeatIcon.data);
repeatDisplay.setTextColor(themeColor);
} else { } else {
repeatDisplay.setTextColor(unsetColor);
repeatDisplay.setText(R.string.repeat_never); repeatDisplay.setText(R.string.repeat_never);
repeatImage.setImageResource(R.drawable.icn_edit_repeats); repeatImage.setImageResource(R.drawable.icn_edit_repeats);
} }

Loading…
Cancel
Save