From 668cecff38a176547f45d19d3868bb66604e315e Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Mon, 17 Dec 2012 11:56:03 -0800 Subject: [PATCH] Better text color for comments button --- astrid/res/layout/header_nav_views.xml | 2 +- astrid/src/com/todoroo/astrid/activity/TaskListActivity.java | 3 +++ astrid/src/com/todoroo/astrid/service/ThemeService.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/astrid/res/layout/header_nav_views.xml b/astrid/res/layout/header_nav_views.xml index c66bd04a3..5df4c456d 100644 --- a/astrid/res/layout/header_nav_views.xml +++ b/astrid/res/layout/header_nav_views.xml @@ -70,7 +70,7 @@ android:layout_width="51dip" android:layout_height="fill_parent" android:background="?attr/asCommentButtonImg" - android:textColor="@android:color/white" + android:textColor="?attr/asTextColorInverse" android:paddingBottom="6dip"/> \ No newline at end of file diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 21abe7b4c..a41e4d59a 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -17,6 +17,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; +import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.ActionBar; import android.support.v4.app.Fragment; @@ -190,6 +191,8 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener mainMenu = (ImageView) actionBar.getCustomView().findViewById(R.id.main_menu); personStatus = (TextView) actionBar.getCustomView().findViewById(R.id.person_image); commentsButton = (Button) actionBar.getCustomView().findViewById(R.id.comments); + if (ThemeService.getUnsimplifiedTheme() == R.style.Theme_White_Alt) + commentsButton.setTextColor(Color.BLACK); initializeFragments(actionBar); createMainMenuPopover(); diff --git a/astrid/src/com/todoroo/astrid/service/ThemeService.java b/astrid/src/com/todoroo/astrid/service/ThemeService.java index cc8b66d52..ca9c8652d 100644 --- a/astrid/src/com/todoroo/astrid/service/ThemeService.java +++ b/astrid/src/com/todoroo/astrid/service/ThemeService.java @@ -48,7 +48,7 @@ public class ThemeService { activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER); } - private static int getTheme() { + public static int getTheme() { int style = getUnsimplifiedTheme(); boolean simple = Preferences.getBoolean(R.string.p_simple_input_boxes, false); if (simple) @@ -56,7 +56,7 @@ public class ThemeService { return style; } - private static int getUnsimplifiedTheme() { + public static int getUnsimplifiedTheme() { String preference = Preferences.getStringValue(R.string.p_theme); return getStyleForSetting(preference); }