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

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

Loading…
Cancel
Save