289 lines
9.3 KiB
XML
289 lines
9.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.core.widget.NestedScrollView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scrollbars="vertical"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/main_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_margin="8dp"
|
|
android:gravity="center_horizontal"
|
|
android:orientation="horizontal"
|
|
android:weightSum="3"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cover_card"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:layout_weight="1"
|
|
app:cardCornerRadius="4dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
|
android:id="@+id/imageView_cover"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scaleType="centerCrop"
|
|
tools:background="@tools:sample/backgrounds/scenic"
|
|
tools:ignore="ContentDescription" />
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/text_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8dp"
|
|
android:layout_weight="2">
|
|
|
|
<TextView
|
|
android:id="@+id/textView_title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
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]" />
|
|
|
|
<TextView
|
|
android:id="@+id/textView_subtitle"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
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[12]" />
|
|
|
|
<TextView
|
|
android:id="@+id/textView_author"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
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" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/info_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:baselineAligned="false"
|
|
android:divider="?android:dividerHorizontal"
|
|
android:dividerPadding="8dp"
|
|
android:orientation="horizontal"
|
|
android:paddingStart="8dp"
|
|
android:paddingEnd="8dp"
|
|
android:showDividers="middle"
|
|
app:layout_constraintTop_toBottomOf="@+id/main_container">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/rating_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:gravity="center">
|
|
|
|
<TextView
|
|
android:id="@+id/textView_rating"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawablePadding="4dp"
|
|
android:padding="4dp"
|
|
android:textSize="20sp"
|
|
app:drawableEndCompat="@drawable/ic_star_manga_info"
|
|
tools:text="4.8" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/chapters_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:gravity="center">
|
|
|
|
<TextView
|
|
android:id="@+id/textView_chapters"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawablePadding="4dp"
|
|
android:gravity="center_horizontal"
|
|
android:padding="4dp"
|
|
android:textSize="12sp"
|
|
app:drawableTopCompat="@drawable/ic_book_page"
|
|
tools:text="52 chapters" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/source_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:gravity="center">
|
|
|
|
<TextView
|
|
android:id="@+id/textView_source"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawablePadding="4dp"
|
|
android:gravity="center_horizontal"
|
|
android:padding="4dp"
|
|
android:textSize="12sp"
|
|
app:drawableTopCompat="@drawable/ic_web"
|
|
tools:text="Source" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/size_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:gravity="center">
|
|
|
|
<TextView
|
|
android:id="@+id/textView_size"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawablePadding="4dp"
|
|
android:gravity="center_horizontal"
|
|
android:padding="4dp"
|
|
android:textSize="12sp"
|
|
app:drawableTopCompat="@drawable/ic_storage"
|
|
tools:text="1.8 GiB" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/buttons_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="48dp"
|
|
android:gravity="center"
|
|
android:orientation="horizontal"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/info_layout">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/button_favorite"
|
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
app:icon="@drawable/ic_heart_outline"
|
|
app:iconGravity="textTop"
|
|
app:iconPadding="0dp" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/button_read"
|
|
style="@style/Widget.MaterialComponents.Button"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_weight="1"
|
|
android:enabled="false"
|
|
android:text="@string/read"
|
|
android:textAllCaps="false"
|
|
app:elevation="0dp"
|
|
app:iconGravity="textStart"
|
|
app:iconPadding="8dp"
|
|
tools:text="@string/_continue" />
|
|
|
|
</LinearLayout>
|
|
|
|
<org.koitharu.kotatsu.base.ui.widgets.ChipsView
|
|
android:id="@+id/chips_tags"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
app:chipSpacingHorizontal="6dp"
|
|
app:chipSpacingVertical="6dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/buttons_layout" />
|
|
|
|
<TextView
|
|
android:id="@+id/desc_header"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_marginEnd="16dp"
|
|
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" />
|
|
|
|
<TextView
|
|
android:id="@+id/textView_description"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_marginEnd="16dp"
|
|
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]" />
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progressBar"
|
|
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:indeterminate="true"
|
|
android:visibility="gone"
|
|
app:layout_constraintBottom_toTopOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:visibility="visible" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView> |