From 3df347b9636214fd4ac54c5a5ae60c21c247e3be Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 3 Apr 2013 13:37:21 -0700 Subject: [PATCH] Added new icons to repeat control set, fixed a color --- .../com/todoroo/astrid/repeats/RepeatControlSet.java | 11 ++++------- astrid/res/layout/control_set_repeat_display.xml | 9 +++++---- astrid/res/values/attrs.xml | 1 - astrid/res/values/colors.xml | 1 + astrid/res/values/styles.xml | 4 ---- .../src/com/todoroo/astrid/service/ThemeService.java | 2 +- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java b/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java index ffa82e60c..a6625b9a5 100644 --- a/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java @@ -16,7 +16,6 @@ import android.app.Activity; import android.app.Dialog; import android.content.DialogInterface; import android.text.TextUtils; -import android.util.TypedValue; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.AdapterView; @@ -42,6 +41,7 @@ import com.todoroo.astrid.data.Task; import com.todoroo.astrid.service.StatisticsConstants; import com.todoroo.astrid.service.StatisticsService; import com.todoroo.astrid.service.TaskService; +import com.todoroo.astrid.service.ThemeService; import com.todoroo.astrid.ui.DateAndTimeDialog; import com.todoroo.astrid.ui.DateAndTimeDialog.DateAndTimeDialogListener; import com.todoroo.astrid.ui.DateAndTimePicker; @@ -400,19 +400,16 @@ public class RepeatControlSet extends PopupControlSet { @Override protected void refreshDisplayView() { TextView repeatDisplay = (TextView) getDisplayView().findViewById(R.id.display_row_edit); - ImageView repeatImage = (ImageView) getDisplayView().findViewById(R.id.repeat_image_icon); + ImageView repeatImage = (ImageView) getDisplayView().findViewById(R.id.display_row_icon); if (doRepeat) { repeatDisplay.setText(getRepeatString(true)); - - TypedValue repeatIcon = new TypedValue(); - activity.getTheme().resolveAttribute(R.attr.asRepeatIcon, repeatIcon, false); - repeatImage.setImageResource(repeatIcon.data); repeatDisplay.setTextColor(themeColor); + repeatImage.setImageResource(ThemeService.getTaskEditDrawable(R.drawable.tea_icn_repeat, R.drawable.tea_icn_repeat)); } else { repeatDisplay.setTextColor(unsetColor); repeatDisplay.setText(R.string.repeat_never); - repeatImage.setImageResource(R.drawable.icn_edit_repeats); + repeatImage.setImageResource(R.drawable.tea_icn_repeat_gray); } } diff --git a/astrid/res/layout/control_set_repeat_display.xml b/astrid/res/layout/control_set_repeat_display.xml index f8f3f11ce..41895ef33 100644 --- a/astrid/res/layout/control_set_repeat_display.xml +++ b/astrid/res/layout/control_set_repeat_display.xml @@ -16,10 +16,11 @@ android:layout_width="fill_parent" android:layout_height="50dip" android:gravity="center_vertical"> - + - diff --git a/astrid/res/values/colors.xml b/astrid/res/values/colors.xml index 7efaacb2f..d1d2cae43 100644 --- a/astrid/res/values/colors.xml +++ b/astrid/res/values/colors.xml @@ -23,6 +23,7 @@ #292929 #000000 #262626 + #385487 #535353 #ffffff diff --git a/astrid/res/values/styles.xml b/astrid/res/values/styles.xml index c2fd364a5..b9497194e 100644 --- a/astrid/res/values/styles.xml +++ b/astrid/res/values/styles.xml @@ -37,7 +37,6 @@ @drawable/lists_disclosure_blue #000000 ?attr/asAbBackgroundColor - @drawable/icn_edit_repeats_blue @drawable/list_popover_bg_white @drawable/list_arrow_up_white @drawable/filter_selected_icon @@ -110,7 +109,6 @@ @drawable/people_menu_button_red @color/red_theme_color @drawable/lists_disclosure_red - @drawable/icn_edit_repeats_red #ffffff @drawable/list_popover_bg @drawable/list_arrow_up @@ -144,7 +142,6 @@ @drawable/people_menu_button_dark_blue @color/dark_blue_theme_color @drawable/lists_disclosure_dark_blue - @drawable/icn_edit_repeats_dark_blue #e9e9e9 @drawable/custom_tab_indicator_dark_blue @style/AstridV11ActionBarStyle.White.Blue @@ -171,7 +168,6 @@ @drawable/lists_disclosure_blue_alt @drawable/custom_tab_indicator_alt @color/blue_theme_color - @drawable/icn_edit_repeats_blue #eee @android:color/white ?attr/asThemeTextColor diff --git a/astrid/src/com/todoroo/astrid/service/ThemeService.java b/astrid/src/com/todoroo/astrid/service/ThemeService.java index d1a938a7e..9973fd1ed 100644 --- a/astrid/src/com/todoroo/astrid/service/ThemeService.java +++ b/astrid/src/com/todoroo/astrid/service/ThemeService.java @@ -268,7 +268,7 @@ public class ThemeService { if (theme == R.style.Theme || theme == R.style.Theme_White_Alt || theme == R.style.Theme_TransparentWhite) { return R.color.blue_theme_color; } else { - return R.color.dark_blue_theme_color; + return R.color.task_edit_selected; } }