1
2
3
|
<
Button
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
/>
|
1
|
android:background="@drawable/upload"
|
1
2
3
4
|
<
ImageButton
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:src
=
"@drawable/upload"
/>
|
1
2
3
4
5
6
7
8
9
|
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
selector
xmlns:android
=
"http://schemas.android.com/apk/res/android"
>
<
item
android:state_pressed
=
"true"
android:drawable
=
"@drawable/up_pressed"
/>
<
item
android:state_pressed
=
"false"
android:drawable
=
"@drawable/up"
/>
selector
>
|
1
|
android:background="@drawable/button_selector"
|
1
2
3
4
5
6
7
8
|
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
shape
xmlns:android
=
"http://schemas.android.com/apk/res/android"
android:shape
=
"rectangle"
>
<
gradient
android:startColor
=
"#808080"
android:endColor
=
"#808080"
android:angle
=
"-90"
/>
shape
>
|
1
2
3
4
5
6
7
8
|
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
shape
xmlns:android
=
"http://schemas.android.com/apk/res/android"
android:shape
=
"rectangle"
>
<
gradient
android:startColor
=
"#FF7F00"
android:endColor
=
"#EE7600"
android:angle
=
"-90"
/>
shape
>
|
1
2
3
4
5
6
7
8
9
10
|
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
selector
xmlns:android
=
"http://schemas.android.com/apk/res/android"
>
<
item
android:state_pressed
=
"true"
android:drawable
=
"@drawable/shape_pressed"
/>
<
item
android:state_pressed
=
"false"
android:drawable
=
"@drawable/shape_normal"
/>
selector
>
|
1
2
3
4
5
6
7
|
<
ImageButton
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:src
=
"@drawable/upload_pressed"
android:padding
=
"5dp"
android:layout_centerVertical
=
"true"
android:background
=
"@drawable/button_selector"
/>
|