![Desired implementation](https://i.stack.imgur.com/rrWxm.png)
Здравствуйте, я хочу воссоздать этот "дизайн" в представлении Android.В основном это ровная граница вокруг TextView.
Я создал TextView:
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="R"
android:textSize="30sp"
android:background="@drawable/border_red"
android:gravity="center" />
И добавил рисованную фигуру:
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
<stroke
android:width="4dp"
android:color="#ff687b" />
<corners android:radius="4dp"/>
<padding android:right="0dp" android:left="0dp" android:bottom="0dp" android:top="0dp"/>
</shape>
Странное поведение в программе предварительного просмотра Android и в приложении.Поведение:
![enter image description here](https://i.stack.imgur.com/kg5dK.png)
Я еще не определил отступы.Все они установлены на 0dp
, но у границы, похоже, уже есть какое-то поле / отступы.
Такое поведение затрудняет создание ровной прямоугольной рамки вокруг символа.: - (
В чем проблема, что я делаю не так?