From 861e7077f04a8b6e72198a2be1dd60c2fd173ad6 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 10 Feb 2012 12:22:42 -0800 Subject: [PATCH] Fixed crashes and theming issues with WidgetConfigActivity --- .../res/drawable/filter_selected_icon_black.png | Bin 0 -> 892 bytes astrid/res/layout/filter_adapter_row.xml | 2 +- astrid/res/layout/widget_config_activity.xml | 2 +- astrid/res/values/attrs.xml | 1 + astrid/res/values/styles.xml | 6 ++++++ .../astrid/widget/WidgetConfigActivity.java | 3 +++ 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 astrid/res/drawable/filter_selected_icon_black.png diff --git a/astrid/res/drawable/filter_selected_icon_black.png b/astrid/res/drawable/filter_selected_icon_black.png new file mode 100644 index 0000000000000000000000000000000000000000..4618874329baf505435c13585ee146fc721bc05c GIT binary patch literal 892 zcmeAS@N?(olHy`uVBq!ia0vp^fZUIm=1A|S46_A;mT9T+xk(-lOY*k^a1Xf`MWP^nD zl@!2AO0sR0B76fBob!uP6-@L@^bC~jxD*r=Y>HCStb$zJpxS{vTcwPWk^(Dz{qpj1 zy>er{{GxPyLrY6beFGzXBO_g)3fgIt8-rd}3%y(5_%moT`wqS%GEWS&ig7N8Y?@*DU*Y-+Xs{y1Hx2{$o+MrGveqHJ5&# z5)|%YBKIPp>40x^%9KX&H`^H5Bsu1|wJbXzxQeG||1)WZ+cVN02uk+~ta)t4EXud< zY4Jt7bJG;AyUMqjRvzDZ+IY?tkrC-bu9{)5j$CTjM@LiHKm;uK@P!h68O(o z=C%Dhbp7lJH94*qb?>USZ25R}@%OH&rwiN9d3juH{?4@G!tYYF=UL#ZxH<)tKRjLiT-G@yGywpos4AfV literal 0 HcmV?d00001 diff --git a/astrid/res/layout/filter_adapter_row.xml b/astrid/res/layout/filter_adapter_row.xml index 2e0a897f9..a9b38d8c5 100644 --- a/astrid/res/layout/filter_adapter_row.xml +++ b/astrid/res/layout/filter_adapter_row.xml @@ -61,7 +61,7 @@ android:layout_toLeftOf="@id/size" android:paddingLeft="5dip" android:paddingRight="5dip" - android:src="@drawable/filter_selected_icon" + android:src="?attr/asFilterSelectedIcon" android:scaleType="fitCenter" android:visibility="gone"/> diff --git a/astrid/res/layout/widget_config_activity.xml b/astrid/res/layout/widget_config_activity.xml index 94c3cf125..ffdb8faf3 100644 --- a/astrid/res/layout/widget_config_activity.xml +++ b/astrid/res/layout/widget_config_activity.xml @@ -5,7 +5,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" - android:background="@drawable/background_gradient"> + style="@style/Content"> + diff --git a/astrid/res/values/styles.xml b/astrid/res/values/styles.xml index db1f1ca99..c20f0933e 100644 --- a/astrid/res/values/styles.xml +++ b/astrid/res/values/styles.xml @@ -34,6 +34,7 @@ @drawable/icn_edit_repeats_blue @drawable/list_popover_bg_white @drawable/list_arrow_up_white + @drawable/filter_selected_icon @drawable/header_blue @@ -80,6 +81,7 @@ #ffffff @drawable/list_popover_bg @drawable/list_arrow_up + @drawable/filter_selected_icon_black @drawable/header_red @@ -347,6 +349,10 @@ ?attr/asTextColorInverse + + diff --git a/astrid/src/com/todoroo/astrid/widget/WidgetConfigActivity.java b/astrid/src/com/todoroo/astrid/widget/WidgetConfigActivity.java index 35ba09f05..2026d296e 100644 --- a/astrid/src/com/todoroo/astrid/widget/WidgetConfigActivity.java +++ b/astrid/src/com/todoroo/astrid/widget/WidgetConfigActivity.java @@ -19,6 +19,7 @@ import com.todoroo.astrid.api.FilterListItem; import com.todoroo.astrid.api.FilterWithCustomIntent; import com.todoroo.astrid.service.StatisticsConstants; import com.todoroo.astrid.service.StatisticsService; +import com.todoroo.astrid.service.ThemeService; @SuppressWarnings("nls") abstract public class WidgetConfigActivity extends ListActivity { @@ -41,6 +42,7 @@ abstract public class WidgetConfigActivity extends ListActivity { @Override public void onCreate(Bundle icicle) { + ThemeService.applyTheme(this); super.onCreate(icicle); // Set the result to CANCELED. This will cause the widget host to cancel @@ -68,6 +70,7 @@ abstract public class WidgetConfigActivity extends ListActivity { // set up ui adapter = new FilterAdapter(this, getListView(), R.layout.filter_adapter_row, true, true); + adapter.filterStyle = R.style.TextAppearance_FLA_Filter_Widget; setListAdapter(adapter); Button button = (Button)findViewById(R.id.ok);