Created
January 10, 2013 23:42
-
-
Save eveliotc/4506761 to your computer and use it in GitHub Desktop.
How to use resources versioning to workaround CompoundButton fix https://github.com/android/platform_frameworks_base/commit/2842679d3426295b6674dfcfb8591fad79de6cb2
This file contains hidden or 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
<!-- res/values/styles.xml --> | |
<style name="MyCheckbox" parent="@android:style/Widget.CompoundButton.CheckBox"> | |
<item name="android:button">@drawable/btn_check</item> | |
<item name="android:paddingLeft">@dimen/checkbox_padding_left_workaround</item> | |
<!-- yada yada yada --> | |
</style> | |
<!-- res/values/dimens.xml --> | |
<dimen name="checkbox_padding_left_workaround">50dip</dimen> <!-- or whatever your drawable is --> | |
<!-- res/values-v17/dimens.xml --> | |
<dimen name="checkbox_padding_left_workaround">0dip</dimen> <!-- yup, you got it --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment