From 54c3dd01a94e57a9f1a8dc93a6252643e7123d64 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 20 Jul 2014 21:50:49 -0400 Subject: [PATCH] Navdrawer: Change text color, not imageview --- .../minimalbible/activity/NavDrawerAdapter.java | 11 ++--------- app/src/main/res/layout/list_navigation_drawer.xml | 10 ---------- app/src/main/res/values/colors.xml | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/org/bspeice/minimalbible/activity/NavDrawerAdapter.java b/app/src/main/java/org/bspeice/minimalbible/activity/NavDrawerAdapter.java index 9d98e7c..5572fca 100644 --- a/app/src/main/java/org/bspeice/minimalbible/activity/NavDrawerAdapter.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/NavDrawerAdapter.java @@ -1,12 +1,10 @@ package org.bspeice.minimalbible.activity; import android.content.Context; -import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; -import android.widget.ImageView; import android.widget.TextView; import org.bspeice.minimalbible.R; @@ -74,9 +72,6 @@ public class NavDrawerAdapter extends BaseAdapter { */ protected class NavItemHolder { - @InjectView(R.id.navlist_selected_highlight) - ImageView highlight; - @InjectView(R.id.navlist_content) TextView content; @@ -94,11 +89,9 @@ public class NavDrawerAdapter extends BaseAdapter { public void bind() { content.setText(object.toString()); if (highlighted) { - highlight.setImageDrawable(new ColorDrawable(v.getResources() - .getColor(R.color.navbar_highlight))); + content.setTextColor(v.getResources().getColor(R.color.navbar_highlight)); } else { - highlight.setImageDrawable(new ColorDrawable(v.getResources() - .getColor(R.color.navbar_unhighlighted))); + content.setTextColor(v.getResources().getColor(R.color.navbar_unhighlighted)); } } } diff --git a/app/src/main/res/layout/list_navigation_drawer.xml b/app/src/main/res/layout/list_navigation_drawer.xml index 27b8156..704f8aa 100644 --- a/app/src/main/res/layout/list_navigation_drawer.xml +++ b/app/src/main/res/layout/list_navigation_drawer.xml @@ -4,16 +4,6 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> - - #dddddd #ffffff #cc0000 - #00cc0000 + #000000