From ac3823e10af746ecc19a878fadd79ecf58fb878f Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 27 Feb 2020 18:58:36 -0500 Subject: [PATCH] Add ripple to menu icons Supersedes https://github.com/inorichi/tachiyomi/pull/2612 --- .../ui/manga/chapter/ChapterHolder.kt | 5 ---- .../ui/recent_updates/RecentChapterHolder.kt | 5 ---- app/src/main/res/layout/chapters_item.xml | 14 +++++----- .../main/res/layout/recent_chapters_item.xml | 27 +++++++++---------- app/src/main/res/values/strings.xml | 1 + 5 files changed, 20 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt index e1af4e3202..45e07801f2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt @@ -6,9 +6,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder -import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.view.gone -import eu.kanade.tachiyomi.util.view.setVectorCompat import java.util.Date import kotlinx.android.synthetic.main.chapters_item.chapter_date import kotlinx.android.synthetic.main.chapters_item.chapter_menu @@ -40,9 +38,6 @@ class ChapterHolder( else -> chapter.name } - // Set the correct drawable for dropdown and update the tint to match theme. - chapter_menu.setVectorCompat(R.drawable.ic_more_vert_black_24dp, view.context.getResourceColor(R.attr.icon_color)) - // Set correct text color chapter_title.setTextColor(if (chapter.read) adapter.readColor else adapter.unreadColor) if (chapter.bookmark) chapter_title.setTextColor(adapter.bookmarkedColor) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt index e72ca9f6bc..efaf7aeaf4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt @@ -8,9 +8,7 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.data.glide.GlideApp import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.system.getResourceColor -import eu.kanade.tachiyomi.util.view.setVectorCompat import kotlinx.android.synthetic.main.recent_chapters_item.chapter_menu -import kotlinx.android.synthetic.main.recent_chapters_item.chapter_menu_icon import kotlinx.android.synthetic.main.recent_chapters_item.chapter_title import kotlinx.android.synthetic.main.recent_chapters_item.download_text import kotlinx.android.synthetic.main.recent_chapters_item.manga_cover @@ -68,9 +66,6 @@ class RecentChapterHolder(private val view: View, private val adapter: RecentCha // Set manga title manga_title.text = item.manga.title - // Set the correct drawable for dropdown and update the tint to match theme. - chapter_menu_icon.setVectorCompat(R.drawable.ic_more_horiz_black_24dp, view.context.getResourceColor(R.attr.icon_color)) - // Set cover GlideApp.with(itemView.context).clear(manga_cover) if (!item.manga.thumbnail_url.isNullOrEmpty()) { diff --git a/app/src/main/res/layout/chapters_item.xml b/app/src/main/res/layout/chapters_item.xml index b62a140a1b..d88cfffdd7 100644 --- a/app/src/main/res/layout/chapters_item.xml +++ b/app/src/main/res/layout/chapters_item.xml @@ -57,19 +57,19 @@ app:layout_constraintStart_toStartOf="parent" tools:text="Pages: 45" /> - + app:layout_constraintBottom_toTopOf="@+id/download_text" + app:srcCompat="@drawable/ic_more_vert_black_24dp" + app:tint="?attr/icon_color" /> - - - - - + app:layout_constraintTop_toTopOf="parent" + app:srcCompat="@drawable/ic_more_horiz_black_24dp" + app:tint="?attr/icon_color" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b07acefe30..738a706b20 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ Settings + Menu Filter Downloaded Bookmarked