Issue
Is it possible to create such button using AppCompat or Material Design libraries? Any style for such button? If not then what is the best way to implement it?
Solution
You can do using layer-list
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
// outer rectangle
<item>
<shape android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="@color/colorWhite" />
<stroke
android:width="1dp"
android:color="@color/colorBlack" />
</shape>
</item>
// inside rectangle
<item
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp">
<shape android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="@color/colorWhite" />
<stroke
android:width="1dp"
android:color="@color/colorAccent" />
</shape>
</item>
</layer-list>
Answered By - Nik
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.