Google Material 風格Android對話框:Material Dialog
這是一個Android庫,用于Google Material 風格Android對話框。使用簡單。
Screenshots



You can also change the background with a image what you like. it's very easy!:


And with the v1.0.6, you can use the setContentView() to change the message view to your custom view.
Example:

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();
...
}
});
mMaterialDialog.show();
// You can change the message anytime. before show
mMaterialDialog.setTitle("提示");
mMaterialDialog.show();
// You can change the message anytime. after show
mMaterialDialog.setMessage("你好,世界~");
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!