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:
Teo Baranga 2023-08-15 10:57:09 +01:00 committed by GitHub
parent c2d499821f
commit 373864ba46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -59,11 +59,13 @@
<TextView
android:id="@+id/item_count"
android:layout_width="24dp"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:background="@drawable/circle_background"
android:background="@drawable/bg_rounded_rect_12dp"
android:gravity="center"
android:minWidth="24dp"
android:paddingHorizontal="8dp"
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
android:textColor="?attr/colorOnPrimary"
app:layout_constraintEnd_toEndOf="parent"
@ -85,4 +87,4 @@
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View 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>