Issue
i want to create a button like this :
as you see the button is curved from the middle to the inside.
i have tries something like this but it's far from what i want.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#FF0000" />
</shape>
</item>
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="0dp"
android:shape="ring"
android:thicknessRatio="2"
android:useLevel="false">
<size
android:width="50dp"
android:height="50dp" />
<solid android:color="@android:color/darker_gray" />
</shape>
</item>
</layer-list>
how can i do this ?
is it possible to create it with xml drawables ?
Solution
This will help you... try...
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#FF0000" />
<size android:height="100dp"
android:width="200dp"/>
</shape>
</item>
<item
android:right="160dp"
android:top="7dp"
android:bottom="7dp"
android:left="-90dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="2dp"
android:shape="oval"
android:useLevel="false">
<size
android:width="50dp"
android:height="50dp" />
<solid android:color="@android:color/darker_gray" />
</shape>
</item>
</layer-list>
Answered By - Raja
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.