From aed6e12119b1b71710a4dd4139e776ca63b4636c Mon Sep 17 00:00:00 2001 From: Soitora Date: Sat, 29 May 2021 04:35:35 +0200 Subject: [PATCH] Add animations for Bottom Navigation items (#5181) * Animated icon for the Library tab Co-Authored-By: CrepeTF <70870719+CrepeTF@users.noreply.github.com> * Animated icon for the More tab Co-Authored-By: CrepeTF <70870719+CrepeTF@users.noreply.github.com> * Rename more_vert to overflow Should maybe help any confusion together with the other more_horiz changes. * Animated icon for the History tab Co-Authored-By: CrepeTF <70870719+CrepeTF@users.noreply.github.com> * Clarify names and clean files * Animated icon for the Updates tab * Animated icon for the Browse tab * Recreate the animated icon for the History tab History icons look better when the internal clock is not moving. Co-authored-by: CrepeTF <70870719+CrepeTF@users.noreply.github.com> --- .../ui/setting/SettingsMainController.kt | 4 +- .../main/res/drawable/anim_browse_enter.xml | 104 +++++++++ .../main/res/drawable/anim_browse_leave.xml | 103 +++++++++ .../main/res/drawable/anim_history_enter.xml | 36 ++++ .../main/res/drawable/anim_library_enter.xml | 185 ++++++++++++++++ .../main/res/drawable/anim_library_leave.xml | 146 +++++++++++++ app/src/main/res/drawable/anim_more_enter.xml | 201 ++++++++++++++++++ .../main/res/drawable/anim_updates_enter.xml | 27 +++ .../main/res/drawable/anim_updates_leave.xml | 27 +++ ...ore_24dp.xml => ic_browse_filled_24dp.xml} | 0 ...ne_24dp.xml => ic_browse_outline_24dp.xml} | 0 .../res/drawable/ic_browse_selector_24dp.xml | 22 ++ .../ic_collections_bookmark_state.xml | 5 - .../main/res/drawable/ic_explore_state.xml | 5 - .../res/drawable/ic_history_selector_24dp.xml | 17 ++ ...rk_24dp.xml => ic_library_filled_24dp.xml} | 0 ...e_24dp.xml => ic_library_outline_24dp.xml} | 0 .../res/drawable/ic_library_selector_24dp.xml | 22 ++ ...c_more_horiz_24dp.xml => ic_more_24dp.xml} | 0 .../res/drawable/ic_more_selector_24dp.xml | 17 ++ .../res/drawable/ic_new_releases_state.xml | 5 - ...ore_vert_24dp.xml => ic_overflow_24dp.xml} | 0 ...es_24dp.xml => ic_updates_filled_24dp.xml} | 0 ...e_24dp.xml => ic_updates_outline_24dp.xml} | 0 .../res/drawable/ic_updates_selector_24dp.xml | 22 ++ .../main/res/layout/common_tabbed_sheet.xml | 2 +- app/src/main/res/layout/download_item.xml | 2 +- app/src/main/res/menu/main_nav.xml | 10 +- 28 files changed, 938 insertions(+), 24 deletions(-) create mode 100644 app/src/main/res/drawable/anim_browse_enter.xml create mode 100644 app/src/main/res/drawable/anim_browse_leave.xml create mode 100644 app/src/main/res/drawable/anim_history_enter.xml create mode 100644 app/src/main/res/drawable/anim_library_enter.xml create mode 100644 app/src/main/res/drawable/anim_library_leave.xml create mode 100644 app/src/main/res/drawable/anim_more_enter.xml create mode 100644 app/src/main/res/drawable/anim_updates_enter.xml create mode 100644 app/src/main/res/drawable/anim_updates_leave.xml rename app/src/main/res/drawable/{ic_explore_24dp.xml => ic_browse_filled_24dp.xml} (100%) rename app/src/main/res/drawable/{ic_explore_outline_24dp.xml => ic_browse_outline_24dp.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_browse_selector_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_collections_bookmark_state.xml delete mode 100644 app/src/main/res/drawable/ic_explore_state.xml create mode 100644 app/src/main/res/drawable/ic_history_selector_24dp.xml rename app/src/main/res/drawable/{ic_collections_bookmark_24dp.xml => ic_library_filled_24dp.xml} (100%) rename app/src/main/res/drawable/{ic_collections_bookmark_outline_24dp.xml => ic_library_outline_24dp.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_library_selector_24dp.xml rename app/src/main/res/drawable/{ic_more_horiz_24dp.xml => ic_more_24dp.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_more_selector_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_new_releases_state.xml rename app/src/main/res/drawable/{ic_more_vert_24dp.xml => ic_overflow_24dp.xml} (100%) rename app/src/main/res/drawable/{ic_new_releases_24dp.xml => ic_updates_filled_24dp.xml} (100%) rename app/src/main/res/drawable/{ic_new_releases_outline_24dp.xml => ic_updates_outline_24dp.xml} (100%) create mode 100644 app/src/main/res/drawable/ic_updates_selector_24dp.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt index 6d456717f..feb9bdf0f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt @@ -29,7 +29,7 @@ class SettingsMainController : SettingsController() { onClick { navigateTo(SettingsGeneralController()) } } preference { - iconRes = R.drawable.ic_collections_bookmark_outline_24dp + iconRes = R.drawable.ic_library_outline_24dp iconTint = tintColor titleRes = R.string.pref_category_library onClick { navigateTo(SettingsLibraryController()) } @@ -53,7 +53,7 @@ class SettingsMainController : SettingsController() { onClick { navigateTo(SettingsTrackingController()) } } preference { - iconRes = R.drawable.ic_explore_outline_24dp + iconRes = R.drawable.ic_browse_outline_24dp iconTint = tintColor titleRes = R.string.browse onClick { navigateTo(SettingsBrowseController()) } diff --git a/app/src/main/res/drawable/anim_browse_enter.xml b/app/src/main/res/drawable/anim_browse_enter.xml new file mode 100644 index 000000000..89be54897 --- /dev/null +++ b/app/src/main/res/drawable/anim_browse_enter.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_browse_leave.xml b/app/src/main/res/drawable/anim_browse_leave.xml new file mode 100644 index 000000000..824218925 --- /dev/null +++ b/app/src/main/res/drawable/anim_browse_leave.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_history_enter.xml b/app/src/main/res/drawable/anim_history_enter.xml new file mode 100644 index 000000000..76069e65d --- /dev/null +++ b/app/src/main/res/drawable/anim_history_enter.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_library_enter.xml b/app/src/main/res/drawable/anim_library_enter.xml new file mode 100644 index 000000000..802db725a --- /dev/null +++ b/app/src/main/res/drawable/anim_library_enter.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_library_leave.xml b/app/src/main/res/drawable/anim_library_leave.xml new file mode 100644 index 000000000..cf5abe631 --- /dev/null +++ b/app/src/main/res/drawable/anim_library_leave.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_more_enter.xml b/app/src/main/res/drawable/anim_more_enter.xml new file mode 100644 index 000000000..08f22d3b3 --- /dev/null +++ b/app/src/main/res/drawable/anim_more_enter.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_updates_enter.xml b/app/src/main/res/drawable/anim_updates_enter.xml new file mode 100644 index 000000000..e093e5ca4 --- /dev/null +++ b/app/src/main/res/drawable/anim_updates_enter.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/anim_updates_leave.xml b/app/src/main/res/drawable/anim_updates_leave.xml new file mode 100644 index 000000000..84abf0982 --- /dev/null +++ b/app/src/main/res/drawable/anim_updates_leave.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_explore_24dp.xml b/app/src/main/res/drawable/ic_browse_filled_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_explore_24dp.xml rename to app/src/main/res/drawable/ic_browse_filled_24dp.xml diff --git a/app/src/main/res/drawable/ic_explore_outline_24dp.xml b/app/src/main/res/drawable/ic_browse_outline_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_explore_outline_24dp.xml rename to app/src/main/res/drawable/ic_browse_outline_24dp.xml diff --git a/app/src/main/res/drawable/ic_browse_selector_24dp.xml b/app/src/main/res/drawable/ic_browse_selector_24dp.xml new file mode 100644 index 000000000..8ba340bce --- /dev/null +++ b/app/src/main/res/drawable/ic_browse_selector_24dp.xml @@ -0,0 +1,22 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_collections_bookmark_state.xml b/app/src/main/res/drawable/ic_collections_bookmark_state.xml deleted file mode 100644 index 573305b57..000000000 --- a/app/src/main/res/drawable/ic_collections_bookmark_state.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/ic_explore_state.xml b/app/src/main/res/drawable/ic_explore_state.xml deleted file mode 100644 index 52e685bd0..000000000 --- a/app/src/main/res/drawable/ic_explore_state.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/ic_history_selector_24dp.xml b/app/src/main/res/drawable/ic_history_selector_24dp.xml new file mode 100644 index 000000000..41b9e2836 --- /dev/null +++ b/app/src/main/res/drawable/ic_history_selector_24dp.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_collections_bookmark_24dp.xml b/app/src/main/res/drawable/ic_library_filled_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_collections_bookmark_24dp.xml rename to app/src/main/res/drawable/ic_library_filled_24dp.xml diff --git a/app/src/main/res/drawable/ic_collections_bookmark_outline_24dp.xml b/app/src/main/res/drawable/ic_library_outline_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_collections_bookmark_outline_24dp.xml rename to app/src/main/res/drawable/ic_library_outline_24dp.xml diff --git a/app/src/main/res/drawable/ic_library_selector_24dp.xml b/app/src/main/res/drawable/ic_library_selector_24dp.xml new file mode 100644 index 000000000..de07adeb9 --- /dev/null +++ b/app/src/main/res/drawable/ic_library_selector_24dp.xml @@ -0,0 +1,22 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_more_horiz_24dp.xml b/app/src/main/res/drawable/ic_more_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_more_horiz_24dp.xml rename to app/src/main/res/drawable/ic_more_24dp.xml diff --git a/app/src/main/res/drawable/ic_more_selector_24dp.xml b/app/src/main/res/drawable/ic_more_selector_24dp.xml new file mode 100644 index 000000000..0e54184a8 --- /dev/null +++ b/app/src/main/res/drawable/ic_more_selector_24dp.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_new_releases_state.xml b/app/src/main/res/drawable/ic_new_releases_state.xml deleted file mode 100644 index 411b420d4..000000000 --- a/app/src/main/res/drawable/ic_new_releases_state.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/ic_more_vert_24dp.xml b/app/src/main/res/drawable/ic_overflow_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_more_vert_24dp.xml rename to app/src/main/res/drawable/ic_overflow_24dp.xml diff --git a/app/src/main/res/drawable/ic_new_releases_24dp.xml b/app/src/main/res/drawable/ic_updates_filled_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_new_releases_24dp.xml rename to app/src/main/res/drawable/ic_updates_filled_24dp.xml diff --git a/app/src/main/res/drawable/ic_new_releases_outline_24dp.xml b/app/src/main/res/drawable/ic_updates_outline_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_new_releases_outline_24dp.xml rename to app/src/main/res/drawable/ic_updates_outline_24dp.xml diff --git a/app/src/main/res/drawable/ic_updates_selector_24dp.xml b/app/src/main/res/drawable/ic_updates_selector_24dp.xml new file mode 100644 index 000000000..df551bc29 --- /dev/null +++ b/app/src/main/res/drawable/ic_updates_selector_24dp.xml @@ -0,0 +1,22 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/common_tabbed_sheet.xml b/app/src/main/res/layout/common_tabbed_sheet.xml index f4032422b..59dd9d9f8 100644 --- a/app/src/main/res/layout/common_tabbed_sheet.xml +++ b/app/src/main/res/layout/common_tabbed_sheet.xml @@ -38,7 +38,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_more_vert_24dp" + app:srcCompat="@drawable/ic_overflow_24dp" app:tint="?attr/colorOnBackground" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/download_item.xml b/app/src/main/res/layout/download_item.xml index 5c593abc0..e433955d8 100644 --- a/app/src/main/res/layout/download_item.xml +++ b/app/src/main/res/layout/download_item.xml @@ -96,7 +96,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_more_vert_24dp" + app:srcCompat="@drawable/ic_overflow_24dp" app:tint="?attr/colorOnBackground" /> diff --git a/app/src/main/res/menu/main_nav.xml b/app/src/main/res/menu/main_nav.xml index cde4691a7..e5f9ec81a 100644 --- a/app/src/main/res/menu/main_nav.xml +++ b/app/src/main/res/menu/main_nav.xml @@ -2,22 +2,22 @@