From eb254d9c56c2a322179088bf55451ed7aad3c331 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 23 Jun 2020 08:51:51 -0400 Subject: [PATCH] Move about summary more/less expander button --- .../manga/chapter/MangaInfoHeaderAdapter.kt | 13 ++++-- app/src/main/res/layout/manga_info_header.xml | 45 ++++++++++--------- app/src/main/res/values/strings.xml | 4 +- 3 files changed, 37 insertions(+), 25 deletions(-) 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 0d9a8daf0..62f8f60fd 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 @@ -293,17 +293,24 @@ class MangaInfoHeaderAdapter( val isExpanded = binding.mangaInfoToggle.text == context.getString(R.string.manga_info_collapse) - binding.mangaInfoToggle.text = - if (isExpanded) { + with(binding.mangaInfoToggle) { + text = if (isExpanded) { context.getString(R.string.manga_info_expand) } else { context.getString(R.string.manga_info_collapse) } + icon = if (isExpanded) { + context.getDrawable(R.drawable.ic_baseline_expand_more_24dp) + } else { + context.getDrawable(R.drawable.ic_baseline_expand_less_24dp) + } + } + with(binding.mangaSummary) { maxLines = if (isExpanded) { - 3 + 2 } else { Int.MAX_VALUE } diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml index b72ac19cd..58630b462 100644 --- a/app/src/main/res/layout/manga_info_header.xml +++ b/app/src/main/res/layout/manga_info_header.xml @@ -176,17 +176,32 @@ - + android:paddingStart="16dp" + android:paddingEnd="16dp"> + + + + + + @@ -237,16 +252,6 @@ -