Я сделал стрелку в drawable xml
, которую я хочу использовать в качестве textview
фона. Но результат не соответствует моим ожиданиям. Я хочу, чтобы первая стрелка показалась на данной картинке. Как это сделать? Можно ли это сделать с drawable xml
.
Выход:

Ожидаемый результат:

Мой xml-код для рисования:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Colored rectangle-->
<item>
<shape android:shape="rectangle">
<size
android:width="@android:dimen/thumbnail_height"
android:height="40dp" />
<solid android:color="#5EB888" />
<corners android:radius="0dp"/>
</shape>
</item>
<!-- This rectangle for the top arrow edge -->
<!-- Its color should be the same as the layout's background -->
<item
android:top="-50dp"
android:bottom="65dp"
android:right="-30dp">
<rotate
android:fromDegrees="45">
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
</shape>
</rotate>
</item>
<!-- This rectangle for the lower arrow edge -->
<!-- Its color should be the same as the layout's background -->
<item
android:top="65dp"
android:bottom="-50dp"
android:right="-30dp">
<rotate
android:fromDegrees="-45">
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
</shape>
</rotate>
</item>
</layer-list>
код компоновки адаптера:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginLeft="10dp"
android:background="#123"
android:layout_marginBottom="5dp"
>
<TextView
android:id="@+id/wifiNameShowTvId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="10dp"
android:textSize="20sp"
android:background="@drawable/custom_shape_ssid"
android:textColor="#f9f9f9"
android:text="dkjfsjkfhskjdfhksjdfh "
/>
</LinearLayout>
* * Тысяча двадцать-один.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.