Issue
Anyone know how to make this type of custom shape drawable view in android.
Solution
Create an XML file and place it in drawable folder.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:right="100dp">
<shape android:shape="rectangle">
<size
android:width="100dp"
android:height="100dp" />
<solid android:color="#F40D20" />
</shape>
</item>
<item android:left="100dp">
<shape android:shape="rectangle">
<size
android:width="100dp"
android:height="100dp" />
<solid android:color="#FFFFFFFF" />
</shape>
</item>
<item android:top="100dp">
<shape android:shape="rectangle">
<size
android:width="100dp"
android:height="100dp" />
<solid android:color="#FFFFFFFF" />
<corners android:topLeftRadius="30dp" />
</shape>
</item>
<item android:bottom="100dp">
<shape android:shape="rectangle">
<size
android:width="100dp"
android:height="100dp" />
<solid android:color="#F40D20" />
<corners android:bottomRightRadius="30dp" />
</shape>
</item>
</layer-list>
Restult:
Change the Radius to looke exactly as you want.
Answered By - Moisoni Ioan


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.