浏览代码

Filled icons in bottom nav when selected

arkon 5 年之前
父节点
当前提交
738f776d36

+ 12 - 0
app/src/main/res/drawable/ic_collections_bookmark_filled_24dp.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6z"/>
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,12l-2.5,-1.5L15,12L15,4h5v8z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_collections_bookmark_state.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_collections_bookmark_filled_24dp" android:state_checked="true" />
+    <item android:drawable="@drawable/ic_collections_bookmark_24dp" android:state_checked="false" />
+</selector>

+ 9 - 0
app/src/main/res/drawable/ic_explore_filled_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_explore_state.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_explore_filled_24dp" android:state_checked="true" />
+    <item android:drawable="@drawable/ic_explore_24dp" android:state_checked="false" />
+</selector>

+ 9 - 0
app/src/main/res/drawable/ic_new_releases_filled_24dp.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_new_releases_state.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_new_releases_filled_24dp" android:state_checked="true" />
+    <item android:drawable="@drawable/ic_new_releases_24dp" android:state_checked="false" />
+</selector>

+ 3 - 3
app/src/main/res/menu/bottom_nav.xml

@@ -2,11 +2,11 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item
         android:id="@+id/nav_library"
-        android:icon="@drawable/ic_collections_bookmark_24dp"
+        android:icon="@drawable/ic_collections_bookmark_state"
         android:title="@string/label_library" />
     <item
         android:id="@+id/nav_updates"
-        android:icon="@drawable/ic_new_releases_24dp"
+        android:icon="@drawable/ic_new_releases_state"
         android:title="@string/label_recent_updates" />
     <item
         android:id="@+id/nav_history"
@@ -14,7 +14,7 @@
         android:title="@string/label_recent_manga" />
     <item
         android:id="@+id/nav_catalogues"
-        android:icon="@drawable/ic_explore_24dp"
+        android:icon="@drawable/ic_explore_state"
         android:title="@string/label_catalogues" />
     <item
         android:id="@+id/nav_more"