hello today
we introduce button layout xml file for colours and properties
xml file btm_all
app>res>drawable
file name - btn_all
we introduce button layout xml file for colours and properties
xml file btm_all
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="17dp" /> <gradient
android:angle="45"
android:centerX="40%"
android:centerColor="#f5e28c"
android:startColor="#f9aaaa"
android:endColor="#fc5454"
android:type="linear"
/> <padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="15dp"
/> <size
android:height="60dp"
android:width="270dp"
/> <stroke
android:width="3dp"
android:color="#f7f4f4"
/> </shape>file location
app>res>drawable
file name - btn_all
preview :-
for
apply button for that background
android:background="@drawable/btn_all"
add that property in Button code
TEXT BOX DRAWABLE xml file :
<?xml version="1.0"
encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="17dp"
/>
<gradient
android:angle="45"
android:centerX="40%"
android:centerColor="#fff9dd"
android:startColor="#fff1f1"
android:endColor="#ffdddd"
android:type="linear"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="15dp"
/>
<size
android:height="30dp"
android:width="270dp"
/>
<stroke
android:width="3dp"
android:color="#4b4b4b"
/>
</shape>
file location
app>res>drawable
file name - text_box.xml
preview :-
apply text box for that background
android:background="@drawable/text_box"
add that property in text box code
No comments:
Post a Comment