A very simple dialog alert
###Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
###Step 2. Add the dependency
dependencies {
compile 'com.github.yzcheng90:AlertView:1.0'
}
compile project(path: ':alertlibrary')
new DialogAlert(activity,DialogAlert.ALERT_DEFAULT)
.setMsg("这里是消息内容")
.setTitle("提示信息")
.setSubmitText("确定")
.setCancelText("取消")
.showAlert()
.setOnDialogAlertClickListener(new DialogAlert.OnDialogAlertClickListener() {
@Override
public void onSubmitClick(DialogAlert d) {
d.dismiss();
}
@Override
public void onCancelClick(DialogAlert d) {
d.dismiss();
}
});