Note
Material Design Dialog is Deprecated, please use AppCompatDialog to instead of.
Material Design Dialog is an Android dialog widget that accords with the Google Material Design.
Enabling you to use Material Design dialogs down to API 14
-
Tiny size of lib, it is just a dialog, make it simple.
-
Easy to use.
-
Required minimum API level: 14(Android 4.0)
-
Supports all the screens sizes and density.
dependencies {
compile 'com.celerysoft:materialdesigndialog:1.0.2'
}
String message = "This dialog use material-design to design it."
+ " Use it if you really like it,"
+ " make it better if you feel it suck."
+ "\nThis dialog has 2 themes and"
+ " 2 styles, hope you can like it.";
final MaterialDesignDialog dialog = new MaterialDesignDialog(this)
.setTitle("Material Design Dialog")
.setMessage(message)
.setCanceledOnTouchOutside(true)
.setPositiveButton("OK", new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();
中国的开发者同仁,你可以在这里查看更详细的使用说明。