fix: episode indicator wrapping on second line (#468)
Fixes #445 The episode indicator background was constrained to a 24dp box. If this box could not contain the count, then the count would wrap onto a new line. The proposed solution is to use a rounded rectangle as the background instead. This can then expand into a chip as needed to accommodate larger numbers without wrapping.
This commit is contained in:
parent
c2d499821f
commit
373864ba46
2 changed files with 11 additions and 3 deletions
|
@ -59,11 +59,13 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/item_count"
|
android:id="@+id/item_count"
|
||||||
android:layout_width="24dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:background="@drawable/circle_background"
|
android:background="@drawable/bg_rounded_rect_12dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:minWidth="24dp"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||||
android:textColor="?attr/colorOnPrimary"
|
android:textColor="?attr/colorOnPrimary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
6
core/src/main/res/drawable/bg_rounded_rect_12dp.xml
Normal file
6
core/src/main/res/drawable/bg_rounded_rect_12dp.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<solid android:color="?attr/colorPrimary" />
|
||||||
|
</shape>
|
Loading…
Reference in a new issue