better resources for radio buttons and checkboxes

This commit is contained in:
Vadim Lopatin 2015-01-13 16:50:45 +03:00
parent acf5fb3531
commit 77a44a9e06
12 changed files with 81 additions and 40 deletions

View File

@ -17,6 +17,13 @@
android:state_enabled="true"
android:drawable="@drawable/btn_check_off_focused" />
<item android:state_checked="true" android:state_hovered="true"
android:state_enabled="true"
android:drawable="@drawable/btn_check_on_focused" />
<item android:state_checked="false" android:state_hovered="true"
android:state_enabled="true"
android:drawable="@drawable/btn_check_off_focused" />
<item android:state_checked="false"
android:state_enabled="true"
android:drawable="@drawable/btn_check_off" />

View File

@ -1,59 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_light" />
<item android:state_checked="true" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_pressed_holo_light" />
android:drawable="@drawable/btn_radio_on_pressed" />
<item android:state_checked="false" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_pressed_holo_light" />
android:drawable="@drawable/btn_radio_off_pressed" />
<item android:state_checked="true" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_focused_holo_light" />
android:drawable="@drawable/btn_radio_on_focused" />
<item android:state_checked="false" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_focused_holo_light" />
android:drawable="@drawable/btn_radio_off_focused" />
<item android:state_checked="true" android:state_hovered="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_focused" />
<item android:state_checked="false" android:state_hovered="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_focused" />
<item android:state_checked="false" android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_light" />
android:drawable="@drawable/btn_radio_off" />
<item android:state_checked="true" android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_light" />
android:drawable="@drawable/btn_radio_on" />
<!-- Disabled states -->
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/btn_radio_on_disabled_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/btn_radio_off_disabled_focused_holo_light" />
<item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
<item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled" />
<item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled" />
</selector>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_light" />
<item android:state_checked="true" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_pressed_holo_light" />
<item android:state_checked="false" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_pressed_holo_light" />
<item android:state_checked="true" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_focused_holo_light" />
<item android:state_checked="false" android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_light" />
<item android:state_checked="true" android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_light" />
<!-- Disabled states -->
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/btn_radio_on_disabled_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/btn_radio_off_disabled_focused_holo_light" />
<item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 593 B

BIN
res/mdpi/btn_radio_off.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

BIN
res/mdpi/btn_radio_on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B