Default colors and dimens per Material Design guidelines and Android Design guidelines inside one library.

Overview

Material Design Dimens

Crates.io Bintray Android Arsenal Build Status

Default colors and dimens per Material Design guidelines and Android Design guidelines inside one library.

Dimens

Pattern:

R.dimen.material_[layout|component|typography]_[keylines|button|...]

R.color.material_[red|blue|...]_[500|800|...]

Usage

Just add the dependency to your build.gradle:

compile 'com.dmitrymalkovich.android:material-design-dimens:1.4'

Examples

Dialogs

Name Dimens Values
Padding around content area @dimen/material_component_dialogs_padding_around_content_area 24dp
Padding between title and body text @dimen/material_component_dialogs_padding_between_title_and_body_text 20dp
Padding around buttons @dimen/material_component_dialogs_padding_around_buttons 8dp
Action area height @dimen/material_component_dialogs_action_area_height 52dp
Dialog elevation @dimen/material_component_dialogs_elevation 24dp

Metrics & Keylines

Name Dimens Values
Screen edge left and right margins @dimen/material_layout_keylines_screen_edge_margin 16dp
Content associated with an icon or avatar left margin @dimen/material_layout_keylines_content_left_margin_from_screen_edge 72dp
Horizontal margins on mobile @dimen/material_layout_keylines_horizontal_mobile_margin 16dp

Cards

Name Dimens Values
Primary title top padding @dimen/material_component_cards_primary_title_top_padding 24dp
Primary title bottom padding @dimen/material_component_cards_primary_title_bottom_padding 16dp
Action button row padding @dimen/material_component_cards_action_button_row_padding 8dp
Supporting text top padding @dimen/material_component_cards_supporting_text_top_padding 16dp
Supporting text bottom padding @dimen/material_component_cards_supporting_text_bottom_padding 24dp

Floating Action Buttons

Dimens Values
@dimen/material_component_floating_action_button_margin 16dp
@dimen/material_component_button_height 36dp
@dimen/material_component_button_touchable_target_height 48dp

Color Palette

Colors Value
@color/material_indigo_100 #C5CAE9
@color/material_indigo_500 #3F51B5
@color/material_indigo_700 #303F9F

Layout

  • Keylines
  • Spacing
  • ... (More comming soon)

Components

  • Bottom sheets
  • Buttons
  • Floating Action Buttons
  • Cards
  • Dialogs
  • Grid lists
  • Lists
  • Text fields
  • Toolbars
  • ... (More comming soon)

Typography

  • Font sizes

Sample

Contributing

Want to add your favorites dimens, just make pull request!

External contributors

License

Copyright 2016 Dmitry Malkovich

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You might also like...
Implementation of Ripple effect from Material Design for Android API 9+
Implementation of Ripple effect from Material Design for Android API 9+

RippleEffect ExpandableLayout provides an easy way to create a view called header with an expandable view. Both view are external layout to allow a ma

Android drawer icon with material design animation
Android drawer icon with material design animation

LDrawer Android drawer icon with material design animation Note Basically same as appcompat_v7 version 21, you can use appcompat_v7 compile 'com.andro

Android drawer icon with material design animation
Android drawer icon with material design animation

LDrawer Android drawer icon with material design animation Note Basically same as appcompat_v7 version 21, you can use appcompat_v7 compile 'com.andro

Floating Action Button for Android based on Material Design specification
Floating Action Button for Android based on Material Design specification

FloatingActionButton Yet another library for drawing Material Design promoted actions. Features Support for normal 56dp and mini 40dp buttons. Customi

Android Material Design Components
Android Material Design Components

Android-Material-Design-Components Material design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. G

A gradle plugin that generates Material Design 3 theme for Android projects.

Same as Google's Material Theme Builder, but as a gradle plugin.

Navigation Drawer Activity with material design style and simplified methods

MaterialNavigationDrawer Navigation Drawer Activity with material design style and simplified methods       It requires 10+ API and android support v7

Material Design icons by Google

Material design icons Material design icons is the official icon set from Google. The icons are designed under the material design guidelines. 4.0.0 U

EditText in Material Design
EditText in Material Design

MaterialEditText NOTE: 2.0 is NOT BACKWARDS COMPATIBLE! See more on wiki or 中文看这里 AppCompat v21 makes it easy to use Material Design EditText in our a

Comments
  • Remove unused resources

    Remove unused resources

    Hey, there were some unneeded things in the lib that could be removed, which would also mean that you could remove the support library dependency in the library, in case there is someone lucky out there who does not need the support lib. I also added a Travis CI script , which you can enable here https://travis-ci.org/

    bug enhancement 
    opened by Jawnnypoo 6
Releases(1.4)
Owner
Dmitry Malkovich
Dmitry Malkovich
Material Shadows for android : A library for supporting convex material shadows

MaterialShadows A library for seamlessly integrating Material shadows. The library takes existing material shadows to next level by adding the followi

Harjot Singh Oberai 2.2k Dec 19, 2022
A library to bring fully animated Material Design components to pre-Lolipop Android.

Material MaterialLibrary is an Open Source Android library that back-port Material Design components to pre-Lolipop Android. MaterialLibrary's origina

Rey Pham 6k Dec 21, 2022
[] Android Library that implements Snackbars from Google's Material Design documentation.

DEPRECATED This lib is deprecated in favor of Google's Design Support Library which includes a Snackbar and is no longer being developed. Thanks for a

null 1.5k Dec 16, 2022
A library support form with material design, construct same with Android UI Framework

SwingUI A slight Java Swing library support form with material design, construct same with Android UI Framework writen in Kotlin Supported: 1. Screen:

Cuong V. Nguyen 3 Jul 20, 2021
A Material Design ViewPager easy to use library

MaterialViewPager Material Design ViewPager easy to use library Sample And have a look on a sample Youtube Video : Youtube Link Download In your modul

Florent CHAMPIGNY 8.2k Jan 1, 2023
Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.

Carbon Material Design implementation for Android 4.0 and newer. This is not the exact copy of the Lollipop's API and features. It's a custom implemen

null 3k Jan 9, 2023
Android Sample Project with Material Design and Toolbar.

AndroidMaterialDesignToolbar -- PROJECT IS NOT SUPPORTED Android Sample Project with Material Design and Toolbar. Project use Appcompat library for ma

kemal selim tekinarslan 713 Nov 11, 2022
Modular and customizable Material Design UI components for Android

Material Components for Android Material Components for Android (MDC-Android) help developers execute Material Design. Developed by a core team of eng

Material Components 14.4k Dec 31, 2022
Easy creation and management of toggle buttons on Android from the Material Design spec.

ToggleButtonLayout Easy creation and management of toggle buttons from the Material Design spec. Read more about ToggleButtonLayout in our blog post.

Savvy 229 Jan 9, 2023
Floating Action Button for Android based on Material Design specification

FloatingActionButton Yet another library for drawing Material Design promoted actions. Features Support for normal 56dp and mini 40dp buttons. Customi

Zendesk 6.4k Dec 26, 2022