Need help with MaterialDesignLibrary?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

navasmdc
9.1K Stars 2.4K Forks Apache License 2.0 74 Commits 264 Opened issues

Description

This is a library with components of Android L to you use in android 2.2

Services available

!
?

Need anything else?

Contributors list

No Data

Material design library logo

Material Design Android Library

Android app on Google Play

Android Arsenal

How to use

If you want use this library, you only have to download MaterialDesign project, import it into your workspace and add the project as a library in your android project settings.

If you prefer it, you can use the gradle dependency, you have to add these lines in your build.gradle file:

repositories {
    jcenter()
}

dependencies { compile 'com.github.navasmdc:MaterialDesign:[email protected]' }

Some components have custom attributes, if you want use them, you must add this line in your xml file in the first component:


If you are going to use a ScrollView, it is recommended that you use the CustomScrollView provided in this library to avoid problems with the custom components. To use this component:

xml


Components

Buttons

Flat Button

flat button

xml

Rectangle Button

rectangle button

xml

Float Button

float button

It is recommended to put this component in the right-bottom of the screen. To use this component write this code in your xml file. If you don`t want to start this component with animation set the animate attribute to false. Put your icon in the icon attribute to set the drawable icon for this component.

    
    

Float small button

float small button


Switches

CheckBox

checkbox


Switch

switch


Progress indicators

Progress bar circular indeterminate

progress bar circular indeterminate


Progress bar indeterminate

progress bar indeterminate


Progress bar indeterminate determinate

Progress bar indeterminate determinate


If you begin progrees, you only have to set progress it

progressBarIndeterminateDeterminate.setProgress(progress);
Progress bar determinate

Progress bar determinate


You can custom max and min progress values with

materialdesign:max="50"
and
materialdesign:min="25"
attributes.
Slider

Slider


Slider with number indicator

Slider with number indicator


Widgets

SnackBar

Snackbar

SnackBar snackbar = new SnackBar(Activity activity, String text, String buttonText, View.OnClickListener onClickListener);
snackbar.show();

If you don't want to show the button, put

null
in
buttonText
attribute

Dialog

Dialog

Dialog dialog = new Dialog(Context context,String title, String message);
dialog.show();

You can set the accept and cancel button on the event listener or change it's text

java
// Set accept click listenner
dialog.setOnAcceptButtonClickListener(View.OnClickListener onAcceptButtonClickListener);
// Set cancel click listenner
dialog.setOnCancelButtonClickListener(View.OnClickListener onCancelButtonClickListener);
// Acces to accept button
ButtonFlat acceptButton = dialog.getButtonAccept();
// Acces to cancel button
ButtonFlat cancelButton = dialog.getButtonCancel();

Color selector

Color selector

ColorSelector colorSelector = new ColorSelector(Context context,int intialColor, OnColorSelectedListener onColorSelectedListener);
colorSelector.show();

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.