Skip to content

Instantly share code, notes, and snippets.

@dlew
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlew/f7026c13fa09fe6df0d6 to your computer and use it in GitHub Desktop.
Save dlew/f7026c13fa09fe6df0d6 to your computer and use it in GitHub Desktop.
Why I hate mixing implicit/explicit styles
<style name="Widget" />

<style name="Widget.Button" />

<style name="Widget.Button.Alternative" parent="@android:style/SomeOtherStyle />

All buttons either use Widget.Button or Widget.Button.Alternative.

I decide to change something in Widget.Button.

Expected: All buttons change.

Actual: Only Widget.Button changes because Widget.Button.Alternative doesn't have anything to do with Widget or Widget.Button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment