Я создал круглую форму под названием круг. xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="#FFF" />
<size
android:width="5dp"
android:height="5dp"/>
<padding
android:left="5dip"
android:right="5dip"
android:top="5dip"
android:bottom="5dip" />
</shape>
В предварительном просмотре он выглядит круглым, а не овальным. Затем я реализовал это в моем текстовом виде:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/addToCartBtn"
android:layout_width="match_parent"
android:text="@string/cart_button_text"
android:textColor="#FFF"
android:background="@color/colorPrimary"
android:layout_height="65dp"/>
<TextView
android:id="@+id/cartItemsCountTV"
android:elevation="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="16dp"
android:layout_alignStart="@id/addToCartBtn"
android:text="1"
android:textSize="16sp"
android:textStyle="bold"
android:background="@drawable/circle"/>
</RelativeLayout>
Тогда результат по-прежнему имеет овальную форму:
![enter image description here](https://i.stack.imgur.com/JVKkC.jpg)
Форма становится круглым только тогда, когда текст состоит из двух цифр, таких как «10». Почему он овальный, хотя должен быть круглым?