diff --git a/app/build.gradle b/app/build.gradle index 798794d71e..1c48d646d0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -212,7 +212,6 @@ dependencies { implementation 'com.afollestad.material-dialogs:core:0.9.6.0' implementation 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.1.0' implementation 'com.github.mthli:Slice:v1.3' - implementation 'me.gujun.android.taggroup:library:1.4@aar' implementation 'com.github.chrisbanes:PhotoView:2.3.0' implementation 'com.github.carlosesco:DirectionalViewPager:a844dbca0a' diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt index 6f376bd286..a6aa931f72 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt @@ -5,9 +5,9 @@ import eu.kanade.tachiyomi.data.database.models.Chapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.download.DownloadStore import eu.kanade.tachiyomi.source.model.Page +import java.util.concurrent.CopyOnWriteArrayList import rx.Observable import rx.subjects.PublishSubject -import java.util.concurrent.CopyOnWriteArrayList class DownloadQueue( private val store: DownloadStore, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt index e5755dff58..09a2b3c0c2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt @@ -25,6 +25,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.transition.Transition +import com.google.android.material.chip.Chip import com.jakewharton.rxbinding.support.v4.widget.refreshes import com.jakewharton.rxbinding.view.clicks import com.jakewharton.rxbinding.view.longClicks @@ -142,8 +143,6 @@ class MangaInfoController : NucleusController(), copyToClipboard(view.context.getString(R.string.description), manga_summary.text.toString()) } - manga_genres_tags.setOnTagClickListener { tag -> performLocalSearch(tag) } - manga_cover.longClicks().subscribeUntilDestroy { copyToClipboard(view.context.getString(R.string.title), presenter.manga.title) } @@ -218,8 +217,15 @@ class MangaInfoController : NucleusController(), manga_source.text = source?.toString() ?: view.context.getString(R.string.unknown) // Update genres list - if (manga.genre.isNullOrBlank().not()) { - manga_genres_tags.setTags(manga.genre?.split(", ")) + if (!manga.genre.isNullOrBlank()) { + manga.genre?.split(", ")?.forEach { genre -> + val chip = Chip(view.context).apply { + text = genre + setOnClickListener { performLocalSearch(genre) } + } + + manga_genres_tags.addView(chip) + } } // Update description TextView. @@ -258,11 +264,6 @@ class MangaInfoController : NucleusController(), } } - override fun onDestroyView(view: View) { - manga_genres_tags.setOnTagClickListener(null) - super.onDestroyView(view) - } - /** * Update chapter count TextView. * diff --git a/app/src/main/res/layout-land/manga_info_controller.xml b/app/src/main/res/layout-land/manga_info_controller.xml index ced02c7eac..3b22007ba2 100644 --- a/app/src/main/res/layout-land/manga_info_controller.xml +++ b/app/src/main/res/layout-land/manga_info_controller.xml @@ -226,17 +226,13 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/manga_summary_label" /> - diff --git a/app/src/main/res/layout/manga_info_controller.xml b/app/src/main/res/layout/manga_info_controller.xml index 15e5482ccf..a3c2e750dc 100644 --- a/app/src/main/res/layout/manga_info_controller.xml +++ b/app/src/main/res/layout/manga_info_controller.xml @@ -274,19 +274,15 @@ - + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 52b59ac0c9..abeab2b0f5 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -50,6 +50,7 @@ @style/PreferenceThemeOverlay @style/Theme.AlertDialog.Light @style/Theme.AlertDialog.Dark + @style/Theme.Widget.Chip @style/Theme.Widget.Button.Outlined.Accent @style/Theme.Widget.Button @style/TextAppearance.Widget.Button @@ -128,6 +129,7 @@ @style/PreferenceThemeOverlay @style/Theme.AlertDialog.Dark @style/Theme.AlertDialog.Dark + @style/Theme.Widget.Chip @style/Theme.Widget.Button.Outlined.Accent @style/Theme.Widget.Button @style/TextAppearance.Widget.Button