Support library for Material Design


License

License

GroupId

GroupId

com.androidhuman
ArtifactId

ArtifactId

support-material
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

aar
Description

Description

Support library for Material Design
Support library for Material Design
Project URL

Project URL

https://github.com/kunny/SupportMaterial
Source Code Management

Source Code Management

https://github.com/kunny/SupportMaterial

Download support-material

How to add to project

<!-- https://jarcasting.com/artifacts/com.androidhuman/support-material/ -->
<dependency>
    <groupId>com.androidhuman</groupId>
    <artifactId>support-material</artifactId>
    <version>0.1.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.androidhuman/support-material/
implementation 'com.androidhuman:support-material:0.1.2'
// https://jarcasting.com/artifacts/com.androidhuman/support-material/
implementation ("com.androidhuman:support-material:0.1.2")
'com.androidhuman:support-material:aar:0.1.2'
<dependency org="com.androidhuman" name="support-material" rev="0.1.2">
  <artifact name="support-material" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.androidhuman', module='support-material', version='0.1.2')
)
libraryDependencies += "com.androidhuman" % "support-material" % "0.1.2"
[com.androidhuman/support-material "0.1.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Support Library for Material Design

Google has released its new design guideline called Material Design with Android 5.0(Lollipop, API Level 21) release with detailed guideline conatins lots of color, keyline, metrics, etc..

This library provides useful resources for applying Google's Material Design to your Android application.

Usage

You can get this library on the Maven Central repository. All you have to do is just adding com.androidhuman:support-material:0.1.2@aar as a dependency to your build.gradle file.

apply plugin: 'com.android.application'

android {
    // Your application configurations...
}

dependencies {
    // Other depedencies...
    compile 'com.androidhuman:support-material:0.1.2@aar' // Add this line
}

Supported items

Color palette

Color palette sample

Color values listed on Style > Color section.

Each item's name is formatted as mtrl_{COLOR_NAME}_{DEGREE}. For instance, for Material Purple with degree of 500, its name will be mtrl_purple_500.

####Usage in code

TextView tv = (TextView) findViewById(R.id.tv);
tv.setTextColor(getResources().getColor(R.color.mtrl_pink_500));

####Usage in resource

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="colorAccent">@color/mtrl_pink_a200</item>
        <item name="colorPrimary">@color/mtrl_indigo_500</item>
        <item name="colorPrimaryDark">@color/mtrl_indigo_700</item>
        <item name="colorControlHighlight">@color/mtrl_blue_500</item>
        <item name="colorControlNormal">@color/mtrl_grey_500</item>
    </style>
</resources>

Typography

Typography

Typographic guidelines listed on Style > Typography section.

Since applying font family(android:fontFamily) is supported from API Level 16(Jellybean), applying material typo style also requires API Level 16 or higher.

Style mapping

Name Style resource
Display 4 @style/MaterialTextApperance.Display4
Display 3 @style/MaterialTextApperance.Display3
Display 2 @style/MaterialTextApperance.Display2
Display 1 @style/MaterialTextApperance.Display1
Headline @style/MaterialTextApperance.Headline
Title @style/MaterialTextApperance.Title
Subhead @style/MaterialTextApperance.Subhead
Body 2 @style/MaterialTextApperance.Body2
Body 1 @style/MaterialTextApperance.Body1
Caption @style/MaterialTextApperance.Caption
Button @style/MaterialTextApperance.Button

Keylines

Keylines and spacing listed on Layout > Metrics & keylines section.

List of supported items:

  • Keylines
  • Vertical spacing

Sample

See the usage in sample application, located at the samples folder.

History

0.1.2

  • Rename prefix 'material_' to 'mtrl_' in color values
  • Keylines and vertical spacing support
  • Fix missing attribute in MaterialTextAppearance.Button

0.1.1

  • Add Typography support
  • Add sample application

0.1.0

  • Initial, with Material Color palette support

License

Copyright 2014 Taeho Kim <jyte82@gmail.com>

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.

Versions

Version
0.1.2
0.1.1
0.1.0