Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A basic dimens.xml for Android, with applied Android Design guidelines
<resources>
<!-- http://developer.android.com/design/style/metrics-grids.html -->
<dimen name="gap_small">4dp</dimen>
<dimen name="gap_medium">8dp</dimen>
<dimen name="gap_large">16dp</dimen>
<dimen name="gap_xlarge">32dp</dimen>
<dimen name="gap_xxlarge">64dp</dimen>
<!-- http://developer.android.com/design/style/typography.html -->
<dimen name="text_size_micro">12sp</dimen>
<dimen name="text_size_small">14sp</dimen>
<dimen name="text_size_medium">18sp</dimen>
<dimen name="text_size_large">22sp</dimen>
</resources>
@alorma

This comment has been minimized.

Copy link

@alorma alorma commented Aug 13, 2014

Maybe add an option to XXXLarge gap?

    <dimen name="gapXXXLarge">128dp</dimen>
@rocboronat

This comment has been minimized.

Copy link
Owner Author

@rocboronat rocboronat commented Jan 18, 2015

Why not? XD

@rocboronat

This comment has been minimized.

Copy link
Owner Author

@rocboronat rocboronat commented Feb 2, 2015

Some days after doing it I've seen that this huge dimen will not be a standard. Actually, that kind of dimens will be defined ad-hoc, ignoring the 8dp rythm. So... going to delete it! :·)

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