Recommendation item on explore screen (not finished)

This commit is contained in:
Zakhar Timoshenko
2023-07-02 02:15:07 +03:00
parent e2835e3e95
commit b2817a2ce7
11 changed files with 171 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="4dp" />
<solid android:color="?colorSurface" />
<size
android:width="12dp"
android:height="12dp" />
</shape>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
android:background="@drawable/list_selector"
android:clipChildren="false">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/imageView_cover"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:scaleType="centerCrop"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kotatsu.Cover.Small"
tools:src="@tools:sample/backgrounds/scenic" />
<TextView
android:id="@+id/textView_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?attr/textAppearanceBodyLarge"
app:layout_constraintBottom_toTopOf="@+id/textView_subtitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView_cover"
app:layout_constraintTop_toTopOf="@+id/imageView_cover"
tools:text="@tools:sample/lorem" />
<TextView
android:id="@+id/textView_subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?attr/textAppearanceBodyMedium"
app:layout_constraintBottom_toBottomOf="@+id/imageView_cover"
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" />
<com.google.android.material.button.MaterialButton
style="@style/Widget.Kotatsu.ExploreButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:gravity="center"
android:text="@string/more"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView_subtitle" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -49,7 +49,7 @@
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginEnd="@dimen/screen_padding"
android:text="@string/saved_manga"
app:drawableStartCompat="@drawable/bg_circle"
app:drawableStartCompat="@drawable/bg_rounded_square"
tools:drawableTint="?colorPrimary" />
<TextView
@@ -61,7 +61,7 @@
android:layout_marginTop="@dimen/margin_small"
android:layout_marginEnd="@dimen/screen_padding"
android:text="@string/pages_cache"
app:drawableStartCompat="@drawable/bg_circle"
app:drawableStartCompat="@drawable/bg_rounded_square"
tools:drawableTint="?colorSecondary" />
<TextView
@@ -73,7 +73,7 @@
android:layout_marginTop="@dimen/margin_small"
android:layout_marginEnd="@dimen/screen_padding"
android:text="@string/other_cache"
app:drawableStartCompat="@drawable/bg_circle"
app:drawableStartCompat="@drawable/bg_rounded_square"
tools:drawableTint="?colorTertiary" />
<TextView
@@ -86,7 +86,7 @@
android:layout_marginEnd="@dimen/screen_padding"
android:layout_marginBottom="@dimen/screen_padding"
android:text="@string/computing_"
app:drawableStartCompat="@drawable/bg_circle"
app:drawableStartCompat="@drawable/bg_rounded_square"
app:drawableTint="?colorSecondaryContainer" />
</merge>

View File

@@ -56,10 +56,8 @@
<item>SOCKS</item>
</string-array>
<string-array name="chart_colors" translatable="false">
<item>#E480F4</item>
<item>#6CC3F3</item>
<item>#7167ED</item>
<item>#D9455F</item>
<item>#6054EA</item>
<item>#6750A4</item>
<item>#21005E</item>
<item>#7D5260</item>
</string-array>
</resources>

View File

@@ -9,7 +9,7 @@
<!--Navigation Views-->
<style name="Widget.Kotatsu.BottomNavigationView" parent="Widget.Material3.BottomNavigationView">
<item name="labelVisibilityMode">unlabeled</item>
<item name="labelVisibilityMode">labeled</item>
<item name="android:background">?attr/colorSurfaceContainerHighest</item>
<item name="compatShadowEnabled">false</item>
</style>