From 3db85c72749d991aed26f965ebab511876c256a5 Mon Sep 17 00:00:00 2001 From: Andreas Date: Tue, 1 Jun 2021 23:59:38 +0200 Subject: [PATCH] Tap to enlarge cover (#5256) * Convert manga_info_header to use ContraintLayout Will help with MotionLayout and tablet layout * Convert to MotionLayout to be able to enlarge cover art * Add keyframes to animations * Remove keyframes Alexa play Despacito * Add back manga_summary_section --- .../ui/manga/info/MangaInfoHeaderAdapter.kt | 1 - app/src/main/res/layout/manga_info_header.xml | 470 +++++++++--------- .../main/res/xml/manga_info_header_scene.xml | 221 ++++++++ 3 files changed, 453 insertions(+), 239 deletions(-) create mode 100644 app/src/main/res/xml/manga_info_header_scene.xml 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 3c121fe5c1..454a1d3cb7 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 @@ -275,7 +275,6 @@ class MangaInfoHeaderAdapter( // Handle showing more or less info merge( - binding.mangaSummarySection.clicks(), binding.mangaSummaryText.clicks(), binding.mangaInfoToggleMore.clicks(), binding.mangaInfoToggleLess.clicks() diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml index 3f2eaa4072..59b48fe57d 100644 --- a/app/src/main/res/layout/manga_info_header.xml +++ b/app/src/main/res/layout/manga_info_header.xml @@ -1,274 +1,268 @@ - - + + + android:layout_height="160dp" + android:layout_marginBottom="-16dp" + android:background="@drawable/manga_info_gradient" + android:backgroundTint="?android:attr/colorBackground" + app:layout_constraintBottom_toBottomOf="@+id/backdrop" /> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="@+id/manga_cover" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/manga_cover"> + app:autoSizeMaxTextSize="20sp" + app:autoSizeMinTextSize="12sp" + app:autoSizeStepGranularity="2sp" + app:autoSizeTextType="uniform" /> - - - + android:textIsSelectable="false" + tools:text="Author" /> - + android:layout_marginBottom="4dp" + android:textIsSelectable="false" + tools:text="Artist" /> - + - + + + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" + android:text="•" + android:textIsSelectable="false" + tools:ignore="HardcodedText" /> - + + + + + + + + + + + + + + + + + + + + + + + app:singleLine="true" /> - + - + + + + + diff --git a/app/src/main/res/xml/manga_info_header_scene.xml b/app/src/main/res/xml/manga_info_header_scene.xml new file mode 100644 index 0000000000..5e29f7a44d --- /dev/null +++ b/app/src/main/res/xml/manga_info_header_scene.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file