Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navasmdc/MaterialDesignLibrary
This is a library with components of Android L to you use in android 2.2
https://github.com/navasmdc/MaterialDesignLibrary
android material-design
Last synced: 3 months ago
JSON representation
This is a library with components of Android L to you use in android 2.2
- Host: GitHub
- URL: https://github.com/navasmdc/MaterialDesignLibrary
- Owner: navasmdc
- License: apache-2.0
- Created: 2014-09-30T07:37:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T17:32:11.000Z (over 1 year ago)
- Last Synced: 2024-07-31T18:15:57.727Z (6 months ago)
- Topics: android, material-design
- Language: Java
- Homepage:
- Size: 8.52 MB
- Stars: 8,996
- Watchers: 502
- Forks: 2,228
- Open Issues: 253
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- -awesome-android-ui - MaterialDesignLibrary - 2.0) | <img src="/art/MaterialDesignLibrary.png" width="100%"> <img src="/art/MaterialDesignLibrary2.png" width="49%"> <img src="/art/MaterialDesignLibrary3.png" width="49%"> <img src="/art/MaterialDesignLibrary4.png" width="49%"> <img src="/art/MaterialDesignLibrary5.png" width="49%"> <img src="/art/MaterialDesignLibrary6.png" width="49%"> <img src="/art/MaterialDesignLibrary7.png" width="49%"> <img src="/art/MaterialDesignLibrary8.png" width="49%"> <img src="/art/MaterialDesignLibrary9.png" width="49%"> <img src="/art/MaterialDesignLibrary10.png" width="49%"> <img src="/art/MaterialDesignLibrary11.png" width="49%"> <img src="/art/MaterialDesignLibrary12.png" width="49%"> <img src="/art/MaterialDesignLibrary13.png" width="49%"> <img src="/art/MaterialDesignLibrary14.png" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - MaterialDesignLibrary - 2.0) | <img src="/art/MaterialDesignLibrary.png" width="100%"> <img src="/art/MaterialDesignLibrary2.png" width="49%"> <img src="/art/MaterialDesignLibrary3.png" width="49%"> <img src="/art/MaterialDesignLibrary4.png" width="49%"> <img src="/art/MaterialDesignLibrary5.png" width="49%"> <img src="/art/MaterialDesignLibrary6.png" width="49%"> <img src="/art/MaterialDesignLibrary7.png" width="49%"> <img src="/art/MaterialDesignLibrary8.png" width="49%"> <img src="/art/MaterialDesignLibrary9.png" width="49%"> <img src="/art/MaterialDesignLibrary10.png" width="49%"> <img src="/art/MaterialDesignLibrary11.png" width="49%"> <img src="/art/MaterialDesignLibrary12.png" width="49%"> <img src="/art/MaterialDesignLibrary13.png" width="49%"> <img src="/art/MaterialDesignLibrary14.png" width="49%"> (Index `(light-weight pages)`)
- awesome-android - MaterialDesignLibrary
- awesome-material-design - MaterialDesignLibrary - Material Components for Android L (Android / Frameworks)
- awesome-github-android-ui - MaterialDesignLibrary - Material Design 安卓库 (MD)
- awesome-android-ui - MaterialDesignLibrary - 2.0) | <img src="/art/MaterialDesignLibrary.png" width="100%"> <img src="/art/MaterialDesignLibrary2.png" width="49%"> <img src="/art/MaterialDesignLibrary3.png" width="49%"> <img src="/art/MaterialDesignLibrary4.png" width="49%"> <img src="/art/MaterialDesignLibrary5.png" width="49%"> <img src="/art/MaterialDesignLibrary6.png" width="49%"> <img src="/art/MaterialDesignLibrary7.png" width="49%"> <img src="/art/MaterialDesignLibrary8.png" width="49%"> <img src="/art/MaterialDesignLibrary9.png" width="49%"> <img src="/art/MaterialDesignLibrary10.png" width="49%"> <img src="/art/MaterialDesignLibrary11.png" width="49%"> <img src="/art/MaterialDesignLibrary12.png" width="49%"> <img src="/art/MaterialDesignLibrary13.png" width="49%"> <img src="/art/MaterialDesignLibrary14.png" width="49%"> (Index)
- awesome-android-ui - https://github.com/navasmdc/MaterialDesignLibrary#flat-button
README
![Material design library logo](images/logo.png)
# Material Design Android Library
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Material%20Design%20Android%20Library-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1156)
* [How to use](#howtouse)
* [Components](#components)
* [Buttons](#buttons)
* [Flat Button](#flat-button)
* [Rectangle Button](#rectangle-button)
* [Float Button](#float-button)
* [Float small button](#float-small-button)
* [Switches](#switches)
* [CheckBox](#checkbox)
* [Switch](#switch)
* [Progress indicators](#progress-indicators)
* [Progress bar circular indeterminate](#progress-bar-circula-rindeterminate)
* [Progress bar indeterminate](#progress-bar-indeterminate)
* [Progress bar indeterminate determinate](#progress-bar-indeterminate-determinate)
* [Progress bar determinate](#progress-bar-determinate)
* [Slider](#slider)
* [Slider with number indicator](#slider-with-number-indicator)
* [Widgets](#widgets)
* [SnackBar](#snackbar)
* [Dialog](#dialog)
* [Color selector](#color-selector)## 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:
```xml
repositories {
jcenter()
}dependencies {
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
}
```Some components have custom attributes, if you want use them, you must add this line in your xml file in the first component:
```xml
```
>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
> xmlns:android="http://schemas.android.com/apk/res/android"
> xmlns:materialdesign="http://schemas.android.com/apk/res-auto"
> android:id="@+id/scroll"
> android:layout_width="match_parent"
> android:layout_height="match_parent">
>
>```##Components
####Buttons
######Flat Button
![flat button](images/flat_button.png)
```xml```
######Rectangle Button
![rectangle button](images/rectangle_button.png)
```xml```
######Float Button
![float button](images/float_button.png)
>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.```xml
```
######Float small button
![float small button](images/float_small_button.png)
```xml
```
####Switches
######CheckBox
![checkbox](images/checkbox.png)```xml
```
######Switch
![switch](images/switch.png)```xml
```
####Progress indicators
######Progress bar circular indeterminate
![progress bar circular indeterminate](images/progress_bar_circular_indeterminate.png)```xml
```
######Progress bar indeterminate
![progress bar indeterminate](images/progress_bar_indeterminate.png)```xml
```
######Progress bar indeterminate determinate
![Progress bar indeterminate determinate](images/progress_bar_indeterminate_determinate.png)```xml
```
>If you begin progrees, you only have to set progress it
>
>```java
>progressBarIndeterminateDeterminate.setProgress(progress);
>```######Progress bar determinate
![Progress bar determinate](images/progress_bar_determinate.png)```xml
```
>You can custom max and min progress values with `materialdesign:max="50"` and `materialdesign:min="25"` attributes.
######Slider
![Slider](images/slider.png)```xml
```
######Slider with number indicator
![Slider with number indicator](images/slider_with_number_indicator.png)```xml
```
##Widgets
####SnackBar
![Snackbar](images/snackbar.png)
```java
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](images/dialog.png)
```java
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](images/color_selector.png)
```java
ColorSelector colorSelector = new ColorSelector(Context context,int intialColor, OnColorSelectedListener onColorSelectedListener);
colorSelector.show();
```