Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save EmperorEarth/b1af06364e0a4893e4d6ee10222d1446 to your computer and use it in GitHub Desktop.
Save EmperorEarth/b1af06364e0a4893e4d6ee10222d1446 to your computer and use it in GitHub Desktop.
Recommended Material Design Dimensions for Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
# Material Design Dimensions
These dimensions are provided as per Material Design Guidelines
to adhere to a 8 dp baseline grid. (With the exception of the
toolbar and notification bar.).
## References
- https://www.google.com/design/spec/layout/metrics-keylines.html
- https://material.io/guidelines/style/typography.html#typography-typeface
-->
<!-- Margins & Padding, 8 dp baseline, https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-baseline-grids -->
<dimen name="margin_padding_size_small">8dp</dimen>
<dimen name="margin_padding_size_medium">16dp</dimen>
<dimen name="margin_padding_size_large">24dp</dimen>
<dimen name="margin_padding_size_xlarge">32dp</dimen>
<dimen name="margin_padding_size_xxlarge">40dp</dimen>
<!-- Launcher Icon Size, https://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html#size -->
<dimen name="launcher_icon_size">@dimen/standard_touch_size</dimen>
<!-- Touch Target Size, https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-touch-target-size-->
<dimen name="standard_touch_size">48dp</dimen>
<!-- Toolbar, 4 dp baseline, https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-baseline-grids -->
<dimen name="toolbar_margin_size">4dp</dimen>
<dimen name="toolbar_icon_size">24dp</dimen>
<!-- Font sizes, https://material.io/guidelines/style/typography.html#typography-typeface -->
<dimen name="text_size_micro">12sp</dimen>
<dimen name="text_size_small">14sp</dimen>
<dimen name="text_size_medium">16sp</dimen>
<dimen name="text_size_large">20sp</dimen>
<dimen name="text_size_xlarge">34sp</dimen>
<dimen name="text_size_xxlarge">45sp</dimen>
<dimen name="text_size_xxxlarge">56sp</dimen>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment