diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/drawable/button_bg.xml | 19 | ||||
-rw-r--r-- | samples/layout/main_button_back.xml | 9 |
2 files changed, 28 insertions, 0 deletions
diff --git a/samples/drawable/button_bg.xml b/samples/drawable/button_bg.xml new file mode 100644 index 0000000..dd54065 --- /dev/null +++ b/samples/drawable/button_bg.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true"> + <shape android:shape="rectangle"> + <gradient + android:startColor="#111" + android:endColor="#000" + /> + </shape> + </item> + <item> + <shape android:shape="rectangle"> + <gradient + android:startColor="#111" + android:endColor="#222" + /> + </shape> + </item> +</selector> diff --git a/samples/layout/main_button_back.xml b/samples/layout/main_button_back.xml new file mode 100644 index 0000000..b356bf6 --- /dev/null +++ b/samples/layout/main_button_back.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<ImageButton xmlns:android="http://schemas.android.com/apk/res/android" + android:background="@drawable/button_bg" + android:padding="5dip" + android:gravity="center" + android:layout_weight="1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" +/> |