From 4e33b93c0865188c5d27b0fb3a470396e20efa7c Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 4 Apr 2020 16:48:15 -0400 Subject: [PATCH] Small UI tweaks Download 3 dots hidden when theres a single chapter downloading Recents now shows the chapter as the title, manga as subtitle Library List view: moved start reading button outside of the manga Reenabled freeform covers Also never commited the fast scroll the gradle, oops --- app/build.gradle.kts | 1 + .../tachiyomi/ui/download/DownloadHolder.kt | 2 + .../tachiyomi/ui/library/LibraryItem.kt | 2 +- .../tachiyomi/ui/recents/RecentMangaHolder.kt | 4 +- .../main/res/layout/catalogue_list_item.xml | 55 ++++++++++--------- .../main/res/layout/display_bottom_sheet.xml | 1 - app/src/main/res/layout/download_item.xml | 7 ++- 7 files changed, 42 insertions(+), 30 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 816322011e..61196b7000 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -195,6 +195,7 @@ dependencies { implementation("me.zhanghai.android.systemuihelper:library:1.0.0") implementation("com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.1.0") implementation("com.github.mthli:Slice:v1.2") + implementation("com.reddit:indicator-fast-scroll:1.2.1") implementation("com.github.kizitonwose:AndroidTagGroup:1.6.0") implementation("com.github.chrisbanes:PhotoView:2.3.0") diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt index e04b4795dc..e3c9c13d92 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt @@ -7,6 +7,7 @@ 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.setVectorCompat +import eu.kanade.tachiyomi.util.view.visibleIf import kotlinx.android.synthetic.main.download_item.* /** @@ -51,6 +52,7 @@ class DownloadHolder(private val view: View, val adapter: DownloadAdapter) : notifyDownloadedPages() } + migration_menu.visibleIf(adapterPosition != 0 || adapterPosition != adapter.itemCount - 1) migration_menu.setVectorCompat( R.drawable.ic_more_vert_black_24dp, view.context .getResourceColor(R.attr.icon_color)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt index da6845dd12..fe9b438fdf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt @@ -47,7 +47,7 @@ class LibraryItem( val parent = adapter.recyclerView return if (parent is AutofitRecyclerView) { val libraryLayout = libraryLayout.getOrDefault() - val isFixedSize = true // fixedSize.getOrDefault() + val isFixedSize = fixedSize.getOrDefault() if (libraryLayout == 0 || manga.isBlank()) { LibraryListHolder(view, adapter as LibraryCategoryAdapter) } else { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt index b8df783533..89c86e41ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt @@ -37,9 +37,9 @@ class RecentMangaHolder( fun bind(item: RecentMangaItem) { download_button.visibleIf(item.mch.manga.source != LocalSource.ID) - title.text = item.mch.manga.title + subtitle.text = item.mch.manga.title val isSearch = adapter.delegate.isSearching() - subtitle.text = item.chapter.name + title.text = item.chapter.name val notValidNum = item.mch.chapter.chapter_number <= 0 body.text = when { item.mch.chapter.id == null -> body.context.getString( diff --git a/app/src/main/res/layout/catalogue_list_item.xml b/app/src/main/res/layout/catalogue_list_item.xml index 0cbfa71008..7d764b1068 100644 --- a/app/src/main/res/layout/catalogue_list_item.xml +++ b/app/src/main/res/layout/catalogue_list_item.xml @@ -37,29 +37,6 @@ tools:ignore="ContentDescription" tools:src="@mipmap/ic_launcher" /> - - - - - - + + + + + @@ -33,6 +34,7 @@ android:id="@+id/close_left" android:layout_width="24dp" android:layout_height="24dp" + android:contentDescription="@string/action_cancel" android:layout_gravity="start|center" android:layout_marginStart="21dp" android:tint="@color/md_white_1000" @@ -57,7 +59,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_drag_handle_black_24dp" /> + app:srcCompat="@drawable/ic_reorder_grey_24dp" /> @@ -96,6 +99,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/migration_menu" app:layout_constraintStart_toEndOf="@+id/reorder" + android:layout_marginEnd="16dp" app:layout_constraintTop_toBottomOf="@+id/chapter_title" />