mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-27 12:27:57 +01:00
New manga info expander (#5771)
* Replace "More" with Arrows We used to have arrows but it was set away from the description which took a lot of space. It was changed to "More" text, but with the recent design changes I think it'd look better to get a mix between them both. * Properly align icons Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com> * Expand support to Tablets Get it... expand... hehe 😎 * Fix expanded width Also fixes so that the constraint for the toggleLess is dependant on the right thing * Give info toggles its own space Uses its own margin now to push info rather than just being attached as a info margin. * Remove weird duplicates I did not add I did not add these but I don't see a reason to keep dupes * Add bottom scrim * Change to centered arrow under info Anyone wanna experiment/build on top off then feel free to tweak * Add background glow to icon for contrast Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com> Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com> Co-authored-by: Andreas <andreas.everos@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
android:id="@+id/backdrop_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/manga_info_gradient"
|
||||
android:background="@drawable/manga_backdrop_gradient"
|
||||
android:backgroundTint="?android:attr/colorBackground"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/backdrop"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -180,59 +180,68 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutDescription="@xml/manga_summary_section_scene"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_actions">
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_summary_text"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLines="2"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_cover"
|
||||
tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" />
|
||||
|
||||
<View
|
||||
android:id="@+id/manga_info_scrim"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32sp"
|
||||
android:background="@drawable/manga_info_gradient"
|
||||
android:backgroundTint="?android:attr/colorBackground"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
|
||||
app:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
|
||||
app:layout_constraintStart_toStartOf="@+id/manga_summary_text" />
|
||||
|
||||
<View
|
||||
android:id="@+id/manga_info_toggle_more_scrim"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="36sp"
|
||||
android:layout_height="18sp"
|
||||
android:background="@drawable/manga_info_more_gradient"
|
||||
android:backgroundTint="?android:attr/colorBackground"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
|
||||
app:layout_constraintEnd_toStartOf="@+id/manga_info_toggle_more"
|
||||
app:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
|
||||
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
|
||||
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/manga_info_toggle_more"
|
||||
style="@style/Widget.Tachiyomi.Button.InlineButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/manga_info_expand"
|
||||
android:textAlignment="viewEnd"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
android:background="@drawable/ic_expand_more_24dp"
|
||||
android:backgroundTint="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
|
||||
app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
|
||||
app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/manga_info_toggle_less"
|
||||
style="@style/Widget.Tachiyomi.Button.InlineButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_expand_less_24dp"
|
||||
android:backgroundTint="?android:attr/textColorPrimary"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/manga_info_collapse"
|
||||
android:textAlignment="viewEnd"
|
||||
android:paddingEnd="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text"
|
||||
tools:visibility="gone" />
|
||||
|
||||
@@ -244,7 +253,7 @@
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_summary_text">
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/manga_genres_tags_compact_chips"
|
||||
|
||||
Reference in New Issue
Block a user