Thursday, 11 June 2015
Rounded corner layout
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/alarm_panel_not_pressed" android:state_pressed="false"/>
<item android:drawable="@drawable/alarm_panel_pressed" android:state_pressed="true"/>
</selector>
//////////////////////////////////////////
alarm_panel_not_pressed
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:startColor="@color/startColor"
android:endColor="@color/endColor"/>
<stroke android:width="0.5dp" android:color="@color/alarmBorder"/>
<corners android:radius="3dp"/>
</shape>
//////////////////////////////////////////
alarm_panel_pressed
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/alarmPressed"/>
<stroke android:width="1dp" android:color="@color/alarmPressed"/>
<corners android:radius="3dp"/>
</shape>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment