summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-05-23 12:59:03 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-29 23:26:22 -0700
commita93df43762f1539593da5f90bec16be2be01d281 (patch)
tree88c45d7ab1bd0242f6a0873158da6e5152e82ecd /java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
parentffd525d8eb9dbe1bc4d87909b01371743c296a16 (diff)
Converted ThemeUtil into a DaggerModule.
This enables us to have Google-Sans font in GoogleDialer and Roboto in AOSP. Bug: 79883035 Test: tap PiperOrigin-RevId: 197774497 Change-Id: I1d490ab196a444c62e439444627d659fc42973ea
Diffstat (limited to 'java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java')
-rw-r--r--java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
index dec6350ae..3a43f8460 100644
--- a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
+++ b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
@@ -30,7 +30,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.dialer.common.Assert;
import com.android.dialer.configprovider.ConfigProviderBindings;
-import com.android.dialer.theme.base.ThemeUtil;
+import com.android.dialer.theme.base.ThemeComponent;
/** Navigation item in a bottom nav. */
final class BottomNavItem extends LinearLayout {
@@ -54,7 +54,10 @@ final class BottomNavItem extends LinearLayout {
@Override
public void setSelected(boolean selected) {
super.setSelected(selected);
- int colorId = selected ? ThemeUtil.getColorPrimary() : ThemeUtil.getTextColorSecondary();
+ int colorId =
+ selected
+ ? ThemeComponent.get(getContext()).theme().getColorPrimary()
+ : ThemeComponent.get(getContext()).theme().getTextColorSecondary();
image.setImageTintList(ColorStateList.valueOf(colorId));
text.setTextColor(colorId);
}