diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
index 454a1d3cb..5523906c8 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
@@ -243,7 +243,7 @@ class MangaInfoHeaderAdapter(
setFavoriteButtonState(manga.favorite)
// Set cover if changed.
- listOf(binding.mangaCover, binding.backdrop).forEach {
+ listOfNotNull(binding.mangaCover, binding.backdrop).forEach {
it.loadAny(manga)
}
@@ -277,7 +277,8 @@ class MangaInfoHeaderAdapter(
merge(
binding.mangaSummaryText.clicks(),
binding.mangaInfoToggleMore.clicks(),
- binding.mangaInfoToggleLess.clicks()
+ binding.mangaInfoToggleLess.clicks(),
+ binding.mangaSummarySection.clicks()
)
.onEach { toggleMangaInfo() }
.launchIn(controller.viewScope)
@@ -288,6 +289,13 @@ class MangaInfoHeaderAdapter(
toggleMangaInfo()
initialLoad = false
}
+
+ // Refreshes will change the state and it needs to be set to correct state to display correctly
+ if (binding.mangaSummaryText.maxLines == 2) {
+ binding.mangaSummarySection.transitionToState(R.id.start)
+ } else {
+ binding.mangaSummarySection.transitionToState(R.id.end)
+ }
}
}
@@ -298,18 +306,17 @@ class MangaInfoHeaderAdapter(
private fun toggleMangaInfo() {
val isCurrentlyExpanded = binding.mangaSummaryText.maxLines != 2
- binding.mangaInfoToggleMoreScrim.isVisible = isCurrentlyExpanded
- binding.mangaInfoToggleMore.isVisible = isCurrentlyExpanded
- binding.mangaInfoToggleLess.isVisible = !isCurrentlyExpanded
+ if (isCurrentlyExpanded) {
+ binding.mangaSummarySection.transitionToStart()
+ } else {
+ binding.mangaSummarySection.transitionToEnd()
+ }
binding.mangaSummaryText.maxLines = if (isCurrentlyExpanded) {
2
} else {
Int.MAX_VALUE
}
-
- binding.mangaGenresTagsCompact.isVisible = isCurrentlyExpanded
- binding.mangaGenresTagsFullChips.isVisible = !isCurrentlyExpanded
}
/**
diff --git a/app/src/main/res/layout-w720dp/manga_info_header.xml b/app/src/main/res/layout-w720dp/manga_info_header.xml
new file mode 100644
index 000000000..299529ef1
--- /dev/null
+++ b/app/src/main/res/layout-w720dp/manga_info_header.xml
@@ -0,0 +1,282 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml
index 69f85920c..e2b80ec53 100644
--- a/app/src/main/res/layout/manga_info_header.xml
+++ b/app/src/main/res/layout/manga_info_header.xml
@@ -168,100 +168,107 @@
app:layout_constraintTop_toTopOf="@+id/btn_favorite"
tools:visibility="visible" />
-
-
-
-
-
-
-
-
-
+ app:layout_constraintTop_toBottomOf="@+id/btn_favorite">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"
+ tools:visibility="gone" />
-
-
-
-
-
+
diff --git a/app/src/main/res/values-sw600dp-port/dimens.xml b/app/src/main/res/values-sw600dp-port/dimens.xml
new file mode 100644
index 000000000..5fb171c81
--- /dev/null
+++ b/app/src/main/res/values-sw600dp-port/dimens.xml
@@ -0,0 +1,4 @@
+
+
+ 80dp
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index dabe27907..fc0c8c13a 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -14,4 +14,6 @@
72dp
16dp
+
+ 128dp
diff --git a/app/src/main/res/xml/manga_info_header_scene.xml b/app/src/main/res/xml/manga_info_header_scene.xml
index de2df81be..047bed8ef 100644
--- a/app/src/main/res/xml/manga_info_header_scene.xml
+++ b/app/src/main/res/xml/manga_info_header_scene.xml
@@ -6,62 +6,15 @@
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:duration="@android:integer/config_mediumAnimTime">
-
-
-
+
-
-
-
-
-
+
@@ -134,19 +94,10 @@
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/manga_cover" />
-
-
-
-
-
diff --git a/app/src/main/res/xml/manga_info_header_scene_sw600dp.xml b/app/src/main/res/xml/manga_info_header_scene_sw600dp.xml
new file mode 100644
index 000000000..f05cd8c4e
--- /dev/null
+++ b/app/src/main/res/xml/manga_info_header_scene_sw600dp.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/xml/manga_summary_section_scene.xml b/app/src/main/res/xml/manga_summary_section_scene.xml
new file mode 100644
index 000000000..49ddc4381
--- /dev/null
+++ b/app/src/main/res/xml/manga_summary_section_scene.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+