Enhance chapter items

This commit is contained in:
Zakhar Timoshenko
2024-01-17 16:09:55 +03:00
parent 12047a85c7
commit 0b4dd5beef
5 changed files with 43 additions and 38 deletions

View File

@@ -0,0 +1,11 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:tint="?attr/colorPrimary"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M8,5v14l11,-7z" />
</vector>

View File

@@ -1,11 +1,11 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?colorError"
android:width="8dp"
android:height="8dp"
android:tint="?attr/colorError"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M7.25 12.5L4.75 9H3.5v6h1.25v-3.5L7.3 15h1.2V9H7.25zM9.5 15h4v-1.25H11v-1.11h2.5v-1.26H11v-1.12h2.5V9h-4zm9.75-6v4.5h-1.12V9.99h-1.25v3.52h-1.13V9H14.5v5c0 0.55 0.45 1 1 1h4c0.55 0 1-0.45 1-1V9h-1.25z" />
android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2z" />
</vector>

View File

@@ -4,27 +4,13 @@
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:layout_height="?attr/listPreferredItemHeight"
android:background="?selectableItemBackground"
android:baselineAligned="false"
android:gravity="center_vertical"
android:minHeight="@dimen/chapter_list_item_height"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_number"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="?android:listPreferredItemPaddingStart"
android:background="@drawable/bg_badge_default"
android:ellipsize="none"
android:gravity="center"
android:singleLine="true"
android:textAlignment="center"
android:textSize="14sp"
tools:text="13"
tools:textColor="?attr/colorOnPrimary" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -38,7 +24,7 @@
android:id="@+id/textView_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="4dp"
android:drawablePadding="8dp"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="?attr/textAppearanceBodyLarge"