diff options
author | calderwoodra <calderwoodra@google.com> | 2018-01-30 14:00:24 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-30 17:43:15 -0800 |
commit | 5e550aadbb9a99885b2c719501d00a491d2ba9db (patch) | |
tree | cc9aac3387613f533cae64f0d717488717cf50aa /java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml | |
parent | 54e90e5c61b563a432ad70066505f08b352837c3 (diff) |
Added badge count feature to bottom nav.
This Change doesn't actually fetch the badge counts, but it's now possible to
set badge counts.
Bug: 72525595
Test: manual
PiperOrigin-RevId: 183887322
Change-Id: I452ca6352133befc8cc2a39c44cd84a33fd66d42
Diffstat (limited to 'java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml')
-rw-r--r-- | java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml b/java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml index f9f2b6102..2d9998af2 100644 --- a/java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml +++ b/java/com/android/dialer/main/impl/res/layout/bottom_nav_item.xml @@ -25,13 +25,31 @@ android:paddingStart="12dp" android:paddingEnd="12dp" android:gravity="center" + android:theme="@style/Theme.AppCompat" android:background="?android:selectableItemBackgroundBorderless"> - <ImageView - android:id="@+id/bottom_nav_item_image" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginBottom="6dp"/> + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="2dp"> + + <ImageView + android:id="@+id/bottom_nav_item_image" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_margin="4dp"/> + + <TextView + android:id="@+id/notification_badge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|end" + android:gravity="center" + android:textSize="12sp" + android:textColor="@color/dialer_primary_text_color_white" + android:background="@drawable/notification_badge" + android:visibility="gone"/> + </FrameLayout> <TextView android:id="@+id/bottom_nav_item_text" |