Custom button have 4 items named cricle, oval, rectangle, and round.
Step 1. Cricle or round
<?xml version="1.0" encoding="UTF-8"?> -Step 2. Oval in button
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="100dp" android:width="100dp" />
<stroke android:width="3dp" android:color="#000000" />
<solid android:color="#00ff51" />
</shape>
<?xml version="1.0" encoding="UTF-8"?> -Step 3. Rectangle in button
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp" />
<stroke android:color="#000000" android:width="3dp" />
<solid android:color="#0004ff" />
</shape>
<?xml version="1.0" encoding="UTF-8"?> -Step 4. Round in button
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="#000000" android:width="3dp" />
<solid android:color="#ff0400" />
</shape>
<?xml version="1.0" encoding="UTF-8"?> -
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp" />
<stroke android:color="#000000" android:width="3dp" />
<solid android:color="#fff700" />
</shape>
No comments:
Post a Comment