Add custom color for radio button

This commit is contained in:
Jimmy Shih
2013-11-21 14:14:00 -08:00
parent b90d3193ab
commit 03145839f3
35 changed files with 85 additions and 33 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -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_dark" />
<item android:state_checked="false" android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_dark" />
<item android:state_checked="true" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_pressed_holo_dark" />
<item android:state_checked="false" android:state_pressed="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_pressed_holo_dark" />
<item android:state_checked="true" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_focused_holo_dark" />
<item android:state_checked="false" android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_focused_holo_dark" />
<item android:state_checked="false" android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_dark" />
<item android:state_checked="true" android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_dark" />
<!-- Disabled states -->
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_on_disabled_holo_dark" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_off_disabled_holo_dark" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/btn_radio_on_disabled_focused_holo_dark" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/btn_radio_off_disabled_focused_holo_dark" />
<item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled_holo_dark" />
<item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled_holo_dark" />
</selector>
+4 -8
View File
@@ -1,16 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with http://android-holo-colors.com -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AutoCompleteTextViewMyTracks" parent="android:Widget.Holo.AutoCompleteTextView">
<item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
<item name="android:background">@drawable/edit_text_holo_dark</item>
<item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
<item name="android:background">@drawable/edit_text_holo_dark</item>
</style>
<style name="ProgressBarMyTracks" parent="android:Widget.Holo.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_holo_dark</item>
<item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_holo_dark</item>
<item name="android:progressDrawable">@drawable/progress_horizontal_holo_dark</item>
<item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_holo_dark</item>
</style>
</resources>
@@ -22,6 +22,7 @@ limitations under the License.
<item name="android:editTextBackground">@drawable/edit_text_holo_dark</item>
<item name="android:listChoiceBackgroundIndicator">@drawable/list_selector_holo_dark</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/btn_check_holo_dark</item>
<item name="android:listChoiceIndicatorSingle">@drawable/btn_radio_holo_dark</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBarMyTracks</item>
<!-- Manually added -->
<item name="android:actionBarStyle">@style/ActionBarStyleMyTracks</item>
@@ -30,6 +31,7 @@ limitations under the License.
</style>
<style name="AlertDialogThemeMyTracks" parent="@android:style/Theme.Holo.Dialog">
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewMyTracks</item>
<item name="android:listChoiceIndicatorSingle">@drawable/btn_radio_holo_dark</item>
<item name="android:textColor">@color/holo_orange_dark</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
+19 -25
View File
@@ -1,40 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with http://android-holo-colors.com -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="EditTextMyTracks" parent="android:Widget.EditText">
<item name="android:background">@drawable/edit_text_holo_dark</item>
<item name="android:textColor">#ffffff</item>
</style>
<style name="AutoCompleteTextViewMyTracks" parent="android:Widget.AutoCompleteTextView">
<item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
<item name="android:background">@drawable/edit_text_holo_dark</item>
<item name="android:textColor">#ffffff</item>
<item name="android:dropDownSelector">@drawable/list_selector_holo_dark</item>
<item name="android:background">@drawable/edit_text_holo_dark</item>
<item name="android:textColor">#ffffff</item>
</style>
<style name="CheckBoxMyTracks" parent="android:Widget.CompoundButton.CheckBox">
<item name="android:button">@drawable/btn_check_holo_dark</item>
<item name="android:button">@drawable/btn_check_holo_dark</item>
</style>
<style name="ProgressBarMyTracks" parent="android:Widget.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_holo_dark</item>
<item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_holo_dark</item>
<item name="android:minHeight">16dip</item>
<item name="android:maxHeight">16dip</item>
<style name="EditTextMyTracks" parent="android:Widget.EditText">
<item name="android:background">@drawable/edit_text_holo_dark</item>
<item name="android:textColor">#ffffff</item>
</style>
<style name="ListViewMyTracks" parent="android:Widget.ListView">
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
</style>
<style name="ListViewMyTracks.White" parent="android:Widget.ListView.White">
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
<item name="android:listSelector">@drawable/list_selector_holo_dark</item>
</style>
<style name="ProgressBarMyTracks" parent="android:Widget.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_holo_dark</item>
<item name="android:indeterminateDrawable">@drawable/progress_indeterminate_horizontal_holo_dark</item>
<item name="android:minHeight">16dip</item>
<item name="android:maxHeight">16dip</item>
</style>
<style name="RadioButtonMyTracks" parent="android:Widget.CompoundButton.RadioButton">
<item name="android:button">@drawable/btn_radio_holo_dark</item>
</style>
<style name="SpinnerItemMyTracks" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
<item name="android:textColor">#ffffff</item>
<item name="android:textColor">#ffffff</item>
</style>
</resources>
+1
View File
@@ -23,6 +23,7 @@ limitations under the License.
<item name="android:listViewStyle">@style/ListViewMyTracks</item>
<item name="android:listViewWhiteStyle">@style/ListViewMyTracks.White</item>
<item name="android:progressBarStyleHorizontal">@style/ProgressBarMyTracks</item>
<item name="android:radioButtonStyle">@style/RadioButtonMyTracks</item>
<item name="android:spinnerItemStyle">@style/SpinnerItemMyTracks</item>
</style>
</resources>