1
Ich benutzerdefinierte mein Layout mit Layer-Liste Xml in Android. Aber ich habe für Layer-Liste getan und sehe genau das, was ich anpassen möchte. Aber wenn ich mich in meinem Layout bewerbe, zeigt es nicht genau, was ich will, ich weiß nicht warum. Bitte hilf mir! Dies ist meine Schicht-list.xml:Benutzerdefiniertes Layout mit Layer-Liste xml nicht genau
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<size
android:width="@dimen/dp35"
android:height="@dimen/dp35" />
<solid android:color="@color/colorAccent" />
</shape>
</item>
<item android:right="12dp"
android:top="@dimen/dp20"
android:bottom="-5dp">
<rotate
android:fromDegrees="25">
<shape android:shape="rectangle">
<solid android:color="@color/colorAccent" />
</shape>
</rotate>
</item>
<item android:left="12.5dp"
android:top="@dimen/dp20"
android:bottom="-5dp">
<rotate
android:fromDegrees="-25">
<shape android:shape="rectangle">
<solid android:color="@color/colorAccent" />
</shape>
</rotate>
</item>
Mein Layout mit Layer-list.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/bg_sale_off"
android:text="Textview"
android:layout_centerInParent="true" />
</RelativeLayout>
Preview 2 (without triangle at bottom)
danken schnell für Ihre Antwort. Aber es hilft mir nicht. – TedVN