From ffe39421b73c37c2e1654eeab48e83596729f981 Mon Sep 17 00:00:00 2001 From: yangyxd Date: Fri, 13 Mar 2020 18:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E4=B8=BB=E9=A1=B5=E5=BA=95?= =?UTF-8?q?=E9=83=A8bar=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/main/MainActivity.kt | 10 ++++++++++ app/src/main/res/drawable/ic_bottom_books.xml | 5 +++++ app/src/main/res/drawable/ic_bottom_books_e.xml | 7 +++++++ app/src/main/res/drawable/ic_bottom_books_s.xml | 6 ++++++ .../main/res/drawable/ic_bottom_explore_black.xml | 5 +++++ .../main/res/drawable/ic_bottom_explore_black_e.xml | 5 +++++ .../main/res/drawable/ic_bottom_explore_black_s.xml | 9 +++++++++ app/src/main/res/drawable/ic_bottom_person.xml | 5 +++++ app/src/main/res/drawable/ic_bottom_person_e.xml | 5 +++++ app/src/main/res/drawable/ic_bottom_person_s.xml | 9 +++++++++ app/src/main/res/drawable/ic_bottom_rss_feed.xml | 5 +++++ app/src/main/res/drawable/ic_bottom_rss_feed_e.xml | 9 +++++++++ app/src/main/res/drawable/ic_bottom_rss_feed_s.xml | 4 ++++ app/src/main/res/drawable/ic_explore_black_24dp.xml | 9 --------- .../res/drawable/ic_library_books_black_24dp.xml | 9 --------- app/src/main/res/drawable/ic_person_black_24dp.xml | 9 --------- app/src/main/res/drawable/ic_rss_feed.xml | 12 ------------ app/src/main/res/menu/main_bnv.xml | 12 ++++++------ app/src/main/res/values/dimens.xml | 2 ++ 19 files changed, 92 insertions(+), 45 deletions(-) create mode 100644 app/src/main/res/drawable/ic_bottom_books.xml create mode 100644 app/src/main/res/drawable/ic_bottom_books_e.xml create mode 100644 app/src/main/res/drawable/ic_bottom_books_s.xml create mode 100644 app/src/main/res/drawable/ic_bottom_explore_black.xml create mode 100644 app/src/main/res/drawable/ic_bottom_explore_black_e.xml create mode 100644 app/src/main/res/drawable/ic_bottom_explore_black_s.xml create mode 100644 app/src/main/res/drawable/ic_bottom_person.xml create mode 100644 app/src/main/res/drawable/ic_bottom_person_e.xml create mode 100644 app/src/main/res/drawable/ic_bottom_person_s.xml create mode 100644 app/src/main/res/drawable/ic_bottom_rss_feed.xml create mode 100644 app/src/main/res/drawable/ic_bottom_rss_feed_e.xml create mode 100644 app/src/main/res/drawable/ic_bottom_rss_feed_s.xml delete mode 100644 app/src/main/res/drawable/ic_explore_black_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_library_books_black_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_person_black_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_rss_feed.xml 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