explaingit

rey5137/material

5,958JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Android library that brings animated Material Design UI components, buttons, sliders, dialogs, progress bars, and more, to devices running Android 4.x that predate Google's native Material Design support.

Mindmap

mindmap
  root((material))
    What it does
      Material Design components
      Android 4.x support
      Animated UI widgets
    Components
      Buttons and FABs
      Progress indicators
      Dialogs and snackbars
      Input sliders switches
    Tech stack
      Java
      Android Gradle
    Licensing
      Apache 2.0
      Free commercial use
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add Material Design animated buttons, progress bars, and dialogs to an Android app targeting devices below Android 5.0.

USE CASE 2

Style an Android app with floating action buttons, sliders, and snackbar notifications using one Gradle dependency line.

USE CASE 3

Switch an app's color scheme at runtime without reloading the screen using the library's dynamic theme support.

USE CASE 4

Replace stock Android checkboxes, radio buttons, and toggle switches with Material-style animated equivalents.

Tech stack

JavaAndroidGradle

Getting it running

Difficulty · easy Time to first run · 30min

Requires AppCompat, CardView, and RecyclerView support libraries which most Android projects already include.

Use freely for personal or commercial projects, keep the copyright and Apache 2.0 license text when you redistribute it.

In plain English

Material is an open-source Android library that brings animated Material Design components to older Android devices, specifically those running below Android 5.0 (also known as Lollipop). Google introduced Material Design with Android 5.0, along with a set of polished, animated UI components. Older Android versions had no built-in access to these components, so this library was created to fill that gap. The library offers a wide range of UI building blocks: circular and linear progress indicators, raised and floating action buttons, checkboxes, radio buttons, toggle switches, sliders, dropdown spinners, text input fields, tab page indicators, snack bar notifications, standard dialogs, and bottom sheet dialogs. Each of these renders with the smooth animations that define the Material Design style. To use it, a developer adds one dependency line to their project's Gradle build file. The library relies on a few standard Android support libraries, namely AppCompat, CardView, and RecyclerView, which most Android projects already include. Components are placed in layouts the same way as any standard Android widget, and they pick up color values from the app's existing theme settings. Detailed styling guidance lives in the project's GitHub wiki. The library also supports dynamic theme switching, which means an app can change the color scheme of these components at runtime without reloading the screen. A demo app was previously available on Google Play to preview all the components in action. Material was written by Rey Pham and is released under the Apache 2.0 license, allowing both commercial and open-source use without cost. The project accepts contributions via pull requests to the dev branch.

Copy-paste prompts

Prompt 1
Show me how to add the Material library dependency in Gradle and place a FloatingActionButton in an Android XML layout with a custom color from my app theme.
Prompt 2
I want a Material-style circular progress dialog that appears while a network request runs and dismisses when it completes. Show me the code.
Prompt 3
How do I use dynamic theme switching in this Material library to change my app's primary color from blue to red at runtime without recreating the activity?
Prompt 4
Show me how to style a Material text input field with a floating label and an error message that appears when the field is submitted empty.
Open on GitHub → Explain another repo

← rey5137 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.