system alert dialog example
来源:互联网 发布:墨子号成功发射 知乎 编辑:程序博客网 时间:2024/06/11 21:35
AndroidManifest.xml
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
import android.app.AlertDialog;
public class example implements OnCancelListener, OnClickListener, OnDismissListener {
private AlertDialogExample mAlertDialogExample = null;
public class AlertDialogExample extends AlertDialog {
public AlertDialogExample(Context context, OnCancelListener onCancelListener,
OnClickListener onClickListener, OnDismissListener onDismissListener) {
super(context, R.style.Dialog);
setTitle(title);
setMessage(message_txt);
setButton(BUTTON_POSITIVE, btn_txt, onClickListener);
setButton(BUTTON_NEGATIVE, cancel_txt, onClickListener);
setOnCancelListener(onCancelListener);
setOnDismissListener(onDismissListener);
getWindow().setType(LayoutParams.TYPE_SYSTEM_ALERT);
}
}
mAlertDialogExample = new AlertDialogExample(mContext, this, this, this);
mAlertDialogExample.show();
@Override
public void onDismiss(DialogInterface dialog) {
}
@Override
public void onCancel(DialogInterface dialog) {
}
@Override
public void onClick(DialogInterface dialog, int which) {
}
}
0 0
- system alert dialog example
- Alert Dialog
- sweet-alert-dialog
- Sweet Alert Dialog
- Sweet Alert Dialog
- Dialog.Alert黑色背景
- android 权限, alert dialog
- Sweet Alert Dialog
- File Dialog Example
- dialog控件Sweet Alert Dialog简单使用
- Alert Dialog "Done"按钮定义.
- 关于alert dialog 设置样式
- System Tray Icon Example
- system verilog example
- Android Custom Dialog – Example
- Dynamics AX 2009 Alert system
- Dialog System 总结
- Dialog System 总结
- Android学习笔记——Activity之显式启动第二个Activity
- Java面试必看二十问题(一)
- Xcode中写C程序的问题
- GIS讲堂第三课-PostGIS空间函数简介
- tensorFlow
- system alert dialog example
- hdu 6011Lotus and Characters
- 3192: [JLOI2013]删除物品
- 工具篇之优雅地使用Sublime Text3
- windows10下安装ubuntu16.04的双系统
- Linux 服务器时间同步
- 第十五周:55. Jump Game
- 摄像机标定02_线阵摄像机(Camera Calibration)
- 问题 C: 神奇的数字9 【数学】