Created
March 22, 2015 03:29
-
-
Save vikramkakkar/3fea4675752ccb238417 to your computer and use it in GitHub Desktop.
Contains resources (defined colors, dimensions, and styles) for RadioGroup and RadioButtons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- Used colors --> | |
<color name="fill_color_when_pressed">#84E056</color> | |
<color name="fill_color_when_active">#397D17</color> | |
<color name="stroke_color">#397D17</color> | |
<!-- Dimensions --> | |
<dimen name="stroke_width">1dp</dimen> | |
<dimen name="corner_radius">5dp</dimen> | |
<!-- set on the RadioGroup --> | |
<style name="RadioGroupStyle"> | |
<item name="android:background">@drawable/radio_group_background</item> | |
<item name="android:divider">@drawable/radio_group_divider</item> | |
<item name="android:showDividers">middle</item> | |
</style> | |
<!-- common attributes for all children - RadioButtons --> | |
<style name="RadioGroupMiddleItemStyle"> | |
<item name="android:layout_marginTop">@dimen/stroke_width</item> | |
<item name="android:layout_marginBottom">@dimen/stroke_width</item> | |
<item name="android:padding">20dp</item> | |
<item name="android:gravity">center</item> | |
<item name="android:button">@null</item> | |
<item name="android:background">@drawable/radio_group_bg_middle_child</item> | |
</style> | |
<!-- attributes for first child - RadioButton --> | |
<style name="RadioGroupFirstItemStyle" parent="RadioGroupMiddleItemStyle"> | |
<item name="android:layout_marginLeft">@dimen/stroke_width</item> | |
<item name="android:background">@drawable/radio_group_bg_first_child</item> | |
</style> | |
<!-- attributes for last child - RadioButton --> | |
<style name="RadioGroupLastItemStyle" parent="RadioGroupMiddleItemStyle"> | |
<item name="android:layout_marginRight">@dimen/stroke_width</item> | |
<item name="android:background">@drawable/radio_group_bg_last_child</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment