Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

An Android library for easily constructing Material Design Dialog in Android version 2.2 ~ L.

Notifications You must be signed in to change notification settings

kerasking/MaterialDialog

Open more actions menu

Repository files navigation

Material Dialog

This is an Android library, I call it MaterialDialog. It's very easy to use. Just new it, then the beautiful AlertDialog will show automatedly. It is artistic, conforms to Google Material Design. I hope that you will like it, and enjoys it. ^ ^

Screenshots

main main main

Usage

Step 1

Import the library, then add it to your /settings.gradle and /app/build.gradle, if you don't know how to do it, you can read my blog for help.

Android Studio 简介及导入 jar 包和第三方开源库方法

Step 2

It's very easy, just like this:

mMaterialDialog = new MaterialDialog(this);
mMaterialDialog.setTitle("MaterialDialog");
mMaterialDialog.setMessage("hello world!");
mMaterialDialog.setPositiveButton("OK", new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        mMaterialDialog.dismiss();
        ...
    }
});

mMaterialDialog.setNegativeButton("CANCLE", new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        mMaterialDialog.dismiss();
        ...
    }
});

With the first init, it will show automatedly. Or, you can init it and call the mMaterialDialog.show() to show the dialog simply.

About me

A student in mainland China. (^ ^ Thanks daimajia)

My blog: http://drakeet.me

More about me: http://drakeet.me/about

About

An Android library for easily constructing Material Design Dialog in Android version 2.2 ~ L.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.