From b8947a1c509c54393dd6f736236caa0d1b933703 Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 19 Jun 2020 17:32:44 -0400 Subject: [PATCH] Bleed cover backdrop into actions bar in manga info header --- .../manga/chapter/MangaInfoHeaderAdapter.kt | 6 +- .../main/res/drawable/manga_info_gradient.xml | 11 + ...o_controller.xml => manga_info_header.xml} | 8 +- .../main/res/layout/manga_info_controller.xml | 236 ---------------- app/src/main/res/layout/manga_info_header.xml | 254 ++++++++++++++++++ 5 files changed, 273 insertions(+), 242 deletions(-) create mode 100644 app/src/main/res/drawable/manga_info_gradient.xml rename app/src/main/res/layout-land/{manga_info_controller.xml => manga_info_header.xml} (98%) delete mode 100644 app/src/main/res/layout/manga_info_controller.xml create mode 100644 app/src/main/res/layout/manga_info_header.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt index 19906692a7..113a1e8a57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.glide.GlideApp import eu.kanade.tachiyomi.data.glide.toMangaThumbnail -import eu.kanade.tachiyomi.databinding.MangaInfoControllerBinding +import eu.kanade.tachiyomi.databinding.MangaInfoHeaderBinding import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.model.SManga @@ -42,12 +42,12 @@ class MangaInfoHeaderAdapter( private var source: Source? = null private val scope = CoroutineScope(Job() + Dispatchers.Main) - private lateinit var binding: MangaInfoControllerBinding + private lateinit var binding: MangaInfoHeaderBinding private var initialLoad: Boolean = true override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HeaderViewHolder { - binding = MangaInfoControllerBinding.inflate(LayoutInflater.from(parent.context), parent, false) + binding = MangaInfoHeaderBinding.inflate(LayoutInflater.from(parent.context), parent, false) return HeaderViewHolder(binding.root) } diff --git a/app/src/main/res/drawable/manga_info_gradient.xml b/app/src/main/res/drawable/manga_info_gradient.xml new file mode 100644 index 0000000000..003e925eac --- /dev/null +++ b/app/src/main/res/drawable/manga_info_gradient.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/app/src/main/res/layout-land/manga_info_controller.xml b/app/src/main/res/layout-land/manga_info_header.xml similarity index 98% rename from app/src/main/res/layout-land/manga_info_controller.xml rename to app/src/main/res/layout-land/manga_info_header.xml index 1b47c2b3f6..ea6a7842f7 100644 --- a/app/src/main/res/layout-land/manga_info_controller.xml +++ b/app/src/main/res/layout-land/manga_info_header.xml @@ -17,7 +17,8 @@ app:layout_constraintDimensionRatio="h,3:2" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.0" /> + app:layout_constraintVertical_bias="0.0" + tools:src="@mipmap/ic_launcher" /> + app:layout_constraintTop_toBottomOf="@id/manga_summary_label" + tools:text="Summary" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -