From 3d5a1e9b30ab4fb7da81e66d8c4d7d95e42b37c7 Mon Sep 17 00:00:00 2001 From: ztimms73 Date: Fri, 18 Jun 2021 03:17:38 +0300 Subject: [PATCH] Finally update details layouts --- .../kotatsu/details/ui/DetailsFragment.kt | 3 - .../layout-w600dp-land/fragment_details.xml | 472 ++++++++---------- .../layout-w600dp-port/fragment_details.xml | 418 ++++++++-------- app/src/main/res/layout/fragment_details.xml | 174 +++---- 4 files changed, 490 insertions(+), 577 deletions(-) diff --git a/app/src/main/java/org/koitharu/kotatsu/details/ui/DetailsFragment.kt b/app/src/main/java/org/koitharu/kotatsu/details/ui/DetailsFragment.kt index bdea2d35d..b3d11d3df 100644 --- a/app/src/main/java/org/koitharu/kotatsu/details/ui/DetailsFragment.kt +++ b/app/src/main/java/org/koitharu/kotatsu/details/ui/DetailsFragment.kt @@ -79,11 +79,8 @@ class DetailsFragment : BaseFragment(), View.OnClickList chaptersContainer.isVisible = false } if (manga.rating == Manga.NO_RATING) { - ratingBar.isVisible = false ratingContainer.isVisible = false } else { - ratingBar.progress = (ratingBar.max * manga.rating).roundToInt() - ratingBar.isVisible = true textViewRating.text = String.format("%.1f", manga.rating * 5) ratingContainer.isVisible = true } diff --git a/app/src/main/res/layout-w600dp-land/fragment_details.xml b/app/src/main/res/layout-w600dp-land/fragment_details.xml index e884b6769..51f3213ed 100644 --- a/app/src/main/res/layout-w600dp-land/fragment_details.xml +++ b/app/src/main/res/layout-w600dp-land/fragment_details.xml @@ -12,284 +12,256 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - - - - - - - - - - + + + + + + - - - - - - + android:layout_margin="8dp" + android:layout_weight="3"> - - - - - - - + + - - - - - - + + + android:layout_marginTop="4dp" + android:requiresFadingEdge="horizontal" + android:textColor="?colorAccent" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="@id/textView_title" + app:layout_constraintStart_toStartOf="@id/textView_title" + app:layout_constraintTop_toBottomOf="@id/textView_subtitle" + tools:text="@tools:sample/full_names" /> - + + + + + + + + + + + + + + + + + + + + + android:layout_gravity="center" + android:layout_weight="1" + android:gravity="center"> + + + + - - + + + android:layout_weight="1" + app:icon="@drawable/ic_heart_outline" + app:iconGravity="textTop" + app:iconPadding="0dp" /> + + - - - - - - - + + - - - - - - - - - - + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:text="@string/description" + android:textAppearance="@style/TextAppearance.AppCompat.Body2" + android:textColor="?android:textColorPrimary" + android:textSize="18sp" + app:layout_constraintTop_toBottomOf="@id/chips_tags" /> + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + android:layout_weight="2" + android:layout_margin="8dp" + android:layout_gravity="center"> - - - - + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="@tools:sample/lorem[30]" /> - - - - + android:layout_marginTop="4dp" + android:ellipsize="end" + android:textSize="14sp" + app:layout_constraintEnd_toEndOf="@id/textView_title" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/textView_title" + tools:text="@tools:sample/lorem[2]" /> - - - - - - + + - - - - - - - - - - + android:layout_marginTop="4dp" + android:baselineAligned="false" + android:divider="?android:dividerHorizontal" + android:dividerPadding="8dp" + android:orientation="horizontal" + android:showDividers="middle" + app:layout_constraintTop_toBottomOf="@+id/textView_author"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -267,7 +239,7 @@ app:chipSpacingVertical="6dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/buttons_layout" /> + app:layout_constraintTop_toBottomOf="@+id/main_container" /> - - - - - + app:layout_constraintTop_toTopOf="parent"> - + - + - + - - - - - - - + android:layout_marginStart="8dp" + android:layout_weight="2"> + + + + + + + + - + + app:layout_constraintTop_toBottomOf="@+id/main_container">