Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Latest commit

 

History

History
83 lines (61 loc) · 3.5 KB

README.md

File metadata and controls

83 lines (61 loc) · 3.5 KB

Download

Simple Material Library

As the names says, it is a simple library which follows Google's Material Design. Lollipop specific effects (such as ripples) won't be ported-back to older versions of Android.

Deprecated

Simple Material Library is deprecated in favour of Google's Material dependency. For learning more about integrating that dependency, please refer to its getting started page.

Screenshot

Sample App

Get it on Google Play

##Gradle Dependency Add following to your build.gradle file:

dependencies {
  compile 'com.github.sufianbabri:simple-material-library:0.1.7'
}

Usage

RaisedButton

<com.simple.material.RaisedButton
        xmlns:raised_button="http://schemas.android.com/apk/res-auto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        raised_button:text="Raised Button" />
        
<com.simple.material.RaisedButton
        xmlns:raised_button="http://schemas.android.com/apk/res-auto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        raised_button:smallButton="true"
        raised_button:text="Small" />

FlatButton

<com.simple.material.FlatButton
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:text="Flat Button"/>

Attributes and their descriptions:

RaisedButton:

Attribute Type Description
iconStart drawable icon to show at left
iconLeft drawable icon to show at start
buttonColor color color of the button, if not provided, colorAccent is used
smallButton boolean true if you want this to be the smaller version of the button
minWidth integer Useful if custom width is desired for a small button. Default is 70dp
minHeight integer Useful if custom height is desired for a small button. Default is 36dp
text String text of the button

FlatButton:

Attribute Type Description
textColor color the color of the text

Change log

0.1.7
  1. fixed padding issue (#8),
  2. added FlatButton,
  3. colorAccent is now picked if no color is provided,
  4. other improvements to library,
  5. small RaisedButton is at least 70dp x 36dp
  6. updated demo app,
  7. uploaded demo app to PlayStore.
0.1.6
  1. now supports icon (#7),
  2. height increased to 35dp of small RaisedButton (previously it was 28dp),
  3. changes to demo app.