Some manga items styling
This commit is contained in:
@@ -85,7 +85,7 @@ class ReadingProgressDrawable(
|
|||||||
paint.color = backgroundColor
|
paint.color = backgroundColor
|
||||||
canvas.drawCircle(cx, cy, radius, paint)
|
canvas.drawCircle(cx, cy, radius, paint)
|
||||||
}
|
}
|
||||||
val innerRadius = radius - paint.strokeWidth / 2f
|
val innerRadius = radius - paint.strokeWidth / 2.5f
|
||||||
paint.style = Paint.Style.STROKE
|
paint.style = Paint.Style.STROKE
|
||||||
if (hasOutline) {
|
if (hasOutline) {
|
||||||
paint.color = outlineColor
|
paint.color = outlineColor
|
||||||
|
|||||||
@@ -3,15 +3,17 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
style="@style/Widget.Material3.CardView.Filled"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
app:cardCornerRadius="12dp">
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -27,13 +29,6 @@
|
|||||||
tools:ignore="ContentDescription"
|
tools:ignore="ContentDescription"
|
||||||
tools:src="@tools:sample/backgrounds/scenic[3]" />
|
tools:src="@tools:sample/backgrounds/scenic[3]" />
|
||||||
|
|
||||||
<org.koitharu.kotatsu.history.ui.util.ReadingProgressView
|
|
||||||
android:id="@+id/progressView"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="4dp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -43,7 +38,8 @@
|
|||||||
android:elegantTextHeight="false"
|
android:elegantTextHeight="false"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:lines="2"
|
android:lines="2"
|
||||||
android:padding="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="4dp"
|
||||||
android:textAppearance="?attr/textAppearanceTitleSmall"
|
android:textAppearance="?attr/textAppearanceTitleSmall"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -52,4 +48,10 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<org.koitharu.kotatsu.history.ui.util.ReadingProgressView
|
||||||
|
android:id="@+id/progressView"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_gravity="top|start" />
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
@@ -5,101 +5,107 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/manga_list_details_item_height"
|
android:layout_height="@dimen/manga_list_details_item_height"
|
||||||
app:cardCornerRadius="12dp">
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
<FrameLayout
|
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||||
|
android:id="@+id/imageView_cover"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kotatsu.Cover"
|
||||||
|
tools:src="@tools:sample/backgrounds/scenic" />
|
||||||
|
|
||||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
<TextView
|
||||||
android:id="@+id/imageView_cover"
|
android:id="@+id/textView_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginStart="16dp"
|
||||||
android:scaleType="centerCrop"
|
android:layout_marginTop="8dp"
|
||||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kotatsu.Cover"
|
android:layout_marginEnd="8dp"
|
||||||
tools:src="@tools:sample/backgrounds/scenic" />
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView_subtitle"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/imageView_cover"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
<org.koitharu.kotatsu.history.ui.util.ReadingProgressView
|
<TextView
|
||||||
android:id="@+id/progressView"
|
android:id="@+id/textView_subtitle"
|
||||||
android:layout_width="32dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_margin="4dp" />
|
android:layout_marginEnd="8dp"
|
||||||
|
android:ellipsize="none"
|
||||||
</FrameLayout>
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
|
android:textAppearance="?attr/textAppearanceBodyMedium"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/imageView_cover"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView_title"
|
||||||
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_margin="16dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:orientation="vertical">
|
android:layout_marginBottom="8dp"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/imageView_cover"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView_subtitle">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView_title"
|
android:id="@+id/textView_tags"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_weight="1"
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
||||||
tools:text="@tools:sample/lorem/random" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView_subtitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:ellipsize="none"
|
android:ellipsize="none"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:requiresFadingEdge="horizontal"
|
android:requiresFadingEdge="horizontal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="?attr/textAppearanceBodyMedium"
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
||||||
tools:text="@tools:sample/lorem/random" />
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/textView_rating"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:baselineAligned="false"
|
android:drawablePadding="4dp"
|
||||||
android:clipChildren="false"
|
android:elegantTextHeight="false"
|
||||||
android:orientation="horizontal">
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="6dp"
|
||||||
<TextView
|
android:singleLine="true"
|
||||||
android:id="@+id/textView_tags"
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
||||||
android:layout_width="0dp"
|
app:drawableEndCompat="@drawable/ic_star"
|
||||||
android:layout_height="wrap_content"
|
tools:ignore="RtlSymmetry"
|
||||||
android:layout_weight="1"
|
tools:text="9.6" />
|
||||||
android:ellipsize="none"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:requiresFadingEdge="horizontal"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
||||||
tools:text="@tools:sample/lorem/random" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView_rating"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawablePadding="4dp"
|
|
||||||
android:elegantTextHeight="false"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingStart="6dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
||||||
app:drawableEndCompat="@drawable/ic_star"
|
|
||||||
tools:ignore="RtlSymmetry"
|
|
||||||
tools:text="9.6" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<org.koitharu.kotatsu.history.ui.util.ReadingProgressView
|
||||||
|
android:id="@+id/progressView"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_gravity="top|start" />
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
<!-- Shapes -->
|
<!-- Shapes -->
|
||||||
|
|
||||||
<style name="ShapeAppearanceOverlay.Kotatsu.Cover" parent="">
|
<style name="ShapeAppearanceOverlay.Kotatsu.Cover" parent="">
|
||||||
<item name="cornerSize">12dp</item>
|
<item name="cornerSize">16dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ShapeAppearanceOverlay.Kotatsu.Cover.Small" parent="">
|
<style name="ShapeAppearanceOverlay.Kotatsu.Cover.Small" parent="">
|
||||||
@@ -220,11 +220,11 @@
|
|||||||
<!-- Progress drawable -->
|
<!-- Progress drawable -->
|
||||||
|
|
||||||
<style name="ProgressDrawable">
|
<style name="ProgressDrawable">
|
||||||
<item name="android:fillAlpha">0.8</item>
|
<item name="android:fillAlpha">1</item>
|
||||||
<item name="android:fillColor">?android:colorBackground</item>
|
<item name="android:fillColor">?attr/colorPrimary</item>
|
||||||
<item name="android:strokeColor">?colorTertiary</item>
|
<item name="android:strokeColor">?attr/colorSurfaceVariant</item>
|
||||||
<item name="android:textColor">?android:textColorPrimary</item>
|
<item name="android:textColor">?attr/colorOnPrimary</item>
|
||||||
<item name="strokeWidth">3dp</item>
|
<item name="strokeWidth">4dp</item>
|
||||||
<item name="android:textSize">9sp</item>
|
<item name="android:textSize">9sp</item>
|
||||||
<item name="autoFitTextSize">true</item>
|
<item name="autoFitTextSize">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user