From de50f53be4061ad9c0817adbf205956cdcd6a2ff Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 6 Jun 2021 16:29:28 +0200 Subject: [PATCH] Fix title jumping around when refreshing (#5328) --- .../tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt | 2 ++ app/src/main/res/layout/manga_info_header.xml | 9 ++++----- app/src/main/res/xml/manga_info_header_scene.xml | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) 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 5523906c8..88e1a0f6a 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 @@ -288,6 +288,8 @@ class MangaInfoHeaderAdapter( if (initialLoad && (fromSource || isTablet)) { toggleMangaInfo() initialLoad = false + // wrap_content and autoFixTextSize can cause unwanted behaviour this tries to solve it + binding.mangaFullTitle.requestLayout() } // Refreshes will change the state and it needs to be set to correct state to display correctly diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml index e2b80ec53..a64c7c3da 100644 --- a/app/src/main/res/layout/manga_info_header.xml +++ b/app/src/main/res/layout/manga_info_header.xml @@ -61,10 +61,9 @@ android:id="@+id/manga_full_title" style="@style/TextAppearance.Medium.Title" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="60sp" android:layout_marginBottom="4dp" android:gravity="bottom" - android:maxLines="3" android:text="@string/manga_info_full_title_label" android:textIsSelectable="false" app:autoSizeMaxTextSize="20sp" @@ -85,14 +84,14 @@ style="@style/TextAppearance.Regular.Body1.Secondary" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" android:textIsSelectable="false" tools:text="Artist" /> + android:layout_height="wrap_content" + android:layout_marginTop="4dp"> -