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:
Soitora
2021-08-27 04:07:30 +02:00
committed by GitHub
parent b3854ad382
commit 57aefcd917
7 changed files with 129 additions and 118 deletions

View File

@@ -11,28 +11,23 @@
</Transition>
<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@+id/manga_info_toggle_more_scrim"
android:layout_width="20dp"
android:layout_height="0dp"
android:visibility="visible"
motion:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
motion:layout_constraintEnd_toStartOf="@+id/manga_info_toggle_more"
motion:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
<Constraint
android:id="@+id/manga_info_toggle_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
motion:layout_constraintEnd_toEndOf="parent" />
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintBottom_toBottomOf="@id/manga_summary_text"
android:layout_marginBottom="-4dp" />
<Constraint
android:id="@+id/manga_info_toggle_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_summary_text" />
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_genres_tags_compact"
android:layout_width="match_parent"
@@ -40,7 +35,7 @@
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_summary_text" />
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more" />
<Constraint
android:id="@+id/manga_genres_tags_full_chips"
android:layout_width="match_parent"
@@ -51,31 +46,54 @@
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />
<Constraint
android:layout_width="0dp"
android:layout_height="wrap_content"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
android:layout_marginStart="16dp"
motion:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="8dp"
android:id="@+id/manga_summary_text"
motion:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="16dp" />
</ConstraintSet>
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@+id/manga_info_toggle_more_scrim"
android:layout_width="20dp"
android:layout_height="0dp"
android:visibility="gone"
motion:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
motion:layout_constraintEnd_toStartOf="@+id/manga_info_toggle_more"
motion:layout_constraintTop_toTopOf="@+id/manga_info_toggle_more" />
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
<Constraint
android:id="@+id/manga_info_scrim"
motion:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="24sp"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
motion:layout_constraintStart_toStartOf="@+id/manga_summary_text"
android:visibility="invisible" />
<Constraint
android:id="@+id/manga_info_toggle_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
motion:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
motion:layout_constraintEnd_toEndOf="parent" />
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintBottom_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_info_toggle_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_summary_text" />
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/manga_summary_text" />
<Constraint
android:id="@+id/manga_genres_tags_compact"
android:layout_width="match_parent"
@@ -83,7 +101,7 @@
android:visibility="gone"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_summary_text" />
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more" />
<Constraint
android:id="@+id/manga_genres_tags_full_chips"
android:layout_width="match_parent"
@@ -94,49 +112,5 @@
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less" />
<Constraint
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
<Constraint
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
<Constraint
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
<Constraint
android:id="@+id/manga_summary_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@+id/manga_cover"
motion:visibilityMode="ignore" />
</ConstraintSet>
</MotionScene>