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="1" + app:cardCornerRadius="4dp" + app:cardElevation="4dp"> - + + + + + android:layout_margin="8dp" + android:layout_weight="3"> - - - - - - - + android:ellipsize="end" + android:textAppearance="@style/TextAppearance.AppCompat.Body2" + android:textColor="?android:textColorPrimary" + android:textSize="20sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="@tools:sample/lorem[15]" /> - + + + + + + + android:layout_gravity="center" + android:layout_weight="1" + android:gravity="center"> + + + + + + + + + + + + + + + + + + + + + + + android:id="@+id/buttons_layout" + android:layout_width="match_parent" + android:layout_height="48dp" + android:layout_marginTop="4dp" + android:gravity="center" + android:orientation="horizontal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/info_layout"> - + android:layout_weight="1" + app:icon="@drawable/ic_heart_outline" + app:iconGravity="textTop" + app:iconPadding="0dp" /> + + - + android:layout_marginTop="8dp" + app:chipSpacingHorizontal="6dp" + app:chipSpacingVertical="6dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/buttons_layout" /> - + - - - + android:layout_height="match_parent" + android:layout_marginBottom="16dp" + android:lineSpacingMultiplier="1.2" + android:textIsSelectable="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/desc_header" + tools:ignore="UnusedAttribute" + tools:text="@tools:sample/lorem/random[25]" /> - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + app:layout_constraintTop_toTopOf="parent"> - + android:layout_margin="8dp" + app:cardCornerRadius="4dp" + app:cardElevation="4dp"> - + + + + + android:layout_weight="2" + android:layout_margin="8dp" + android:layout_gravity="center"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -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_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - + android:layout_margin="8dp" + android:layout_weight="1" + app:cardCornerRadius="4dp" + app:cardElevation="4dp"> - + + + + + android:layout_marginStart="8dp" + android:layout_weight="2"> - + - + - + + + + + + app:layout_constraintTop_toBottomOf="@+id/main_container">