diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index 96424cc9b..462fb317d 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -3,6 +3,8 @@ package io.legado.app.ui.main import android.os.Bundle import android.view.KeyEvent import android.view.MenuItem +import androidx.core.view.forEach +import androidx.core.view.forEachIndexed import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentStatePagerAdapter @@ -94,6 +96,14 @@ class MainActivity : VMBaseActivity(R.layout.activity_main), bottom_navigation_view.menu.getItem(3).isChecked = true } } + + +// bottom_navigation_view.menu.forEachIndexed { index, item -> +// if (item.isChecked) +// item.icon = getDrawable(res[1][index]) +// else +// item.icon = getDrawable(res[0][index]) +// } } override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean { diff --git a/app/src/main/res/drawable/ic_bottom_books.xml b/app/src/main/res/drawable/ic_bottom_books.xml new file mode 100644 index 000000000..ffda5c5d6 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_books.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_bottom_books_e.xml b/app/src/main/res/drawable/ic_bottom_books_e.xml new file mode 100644 index 000000000..ff159823a --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_books_e.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_bottom_books_s.xml b/app/src/main/res/drawable/ic_bottom_books_s.xml new file mode 100644 index 000000000..eb36d0fa2 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_books_s.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_bottom_explore_black.xml b/app/src/main/res/drawable/ic_bottom_explore_black.xml new file mode 100644 index 000000000..776e0cc40 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_explore_black.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_bottom_explore_black_e.xml b/app/src/main/res/drawable/ic_bottom_explore_black_e.xml new file mode 100644 index 000000000..fdbdedd39 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_explore_black_e.xml @@ -0,0 +1,5 @@ + + + + diff --git a/app/src/main/res/drawable/ic_bottom_explore_black_s.xml b/app/src/main/res/drawable/ic_bottom_explore_black_s.xml new file mode 100644 index 000000000..1b7a47026 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_explore_black_s.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_bottom_person.xml b/app/src/main/res/drawable/ic_bottom_person.xml new file mode 100644 index 000000000..9ecbba79f --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_person.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_bottom_person_e.xml b/app/src/main/res/drawable/ic_bottom_person_e.xml new file mode 100644 index 000000000..f2ee25675 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_person_e.xml @@ -0,0 +1,5 @@ + + + + diff --git a/app/src/main/res/drawable/ic_bottom_person_s.xml b/app/src/main/res/drawable/ic_bottom_person_s.xml new file mode 100644 index 000000000..f0d729116 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_person_s.xml @@ -0,0 +1,9 @@ + + + + diff --git a/app/src/main/res/drawable/ic_bottom_rss_feed.xml b/app/src/main/res/drawable/ic_bottom_rss_feed.xml new file mode 100644 index 000000000..26d0b4322 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_rss_feed.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_bottom_rss_feed_e.xml b/app/src/main/res/drawable/ic_bottom_rss_feed_e.xml new file mode 100644 index 000000000..b69c2336d --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_rss_feed_e.xml @@ -0,0 +1,9 @@ + + + + diff --git a/app/src/main/res/drawable/ic_bottom_rss_feed_s.xml b/app/src/main/res/drawable/ic_bottom_rss_feed_s.xml new file mode 100644 index 000000000..b14351098 --- /dev/null +++ b/app/src/main/res/drawable/ic_bottom_rss_feed_s.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_explore_black_24dp.xml b/app/src/main/res/drawable/ic_explore_black_24dp.xml deleted file mode 100644 index d841826b0..000000000 --- a/app/src/main/res/drawable/ic_explore_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_library_books_black_24dp.xml b/app/src/main/res/drawable/ic_library_books_black_24dp.xml deleted file mode 100644 index 06deda209..000000000 --- a/app/src/main/res/drawable/ic_library_books_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_person_black_24dp.xml b/app/src/main/res/drawable/ic_person_black_24dp.xml deleted file mode 100644 index 9f1acc792..000000000 --- a/app/src/main/res/drawable/ic_person_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_rss_feed.xml b/app/src/main/res/drawable/ic_rss_feed.xml deleted file mode 100644 index ed6228cc2..000000000 --- a/app/src/main/res/drawable/ic_rss_feed.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/app/src/main/res/menu/main_bnv.xml b/app/src/main/res/menu/main_bnv.xml index fb34daff3..a696febe9 100644 --- a/app/src/main/res/menu/main_bnv.xml +++ b/app/src/main/res/menu/main_bnv.xml @@ -5,19 +5,19 @@ + android:id="@+id/menu_rss" + android:icon="@drawable/ic_bottom_rss_feed" + android:title="@string/rss" /> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 9f8946337..6b7b8e2b1 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -35,4 +35,6 @@ 8dp 8dp 8dp + + 8dp \ No newline at end of file