Skip to content

Instantly share code, notes, and snippets.

@aeroechelon
Last active October 6, 2022 04:06
Show Gist options
  • Save aeroechelon/f6c205e04b241b43c80b to your computer and use it in GitHub Desktop.
Save aeroechelon/f6c205e04b241b43c80b 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 common dimensions for spacing and typepography that
are provided as per Material Design Guidelines.
-->
<!-- Margin & Padding, 8 dp baseline, https://material.io/design/layout/understanding-layout.html -->
<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>
<!-- Touch Target Size, https://material.io/design/usability/accessibility.html#layout-and-typography -->
<dimen name="standard_touch_size">48dp</dimen>
<!-- Font sizes, https://material.io/design/typography/the-type-system.html#type-scale -->
<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>
@aeroechelon
Copy link
Author

@aeroechelon
Copy link
Author

Font section has been updated to match new Material Design spec.

@aeroechelon
Copy link
Author

Style sheet has been updated to include references specified dimensions.

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