2020-09-22
程序员文章站
2022-06-24 19:08:16
因为需要用到server 弹出dialog 获取系统级别的dialog .网上百度一直百度,后来发现是参数错了,记录一下 android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(getContext()); builder.setPositiveButton("确定", new DialogInterface....
因为需要用到server 弹出dialog 获取系统级别的dialog .网上百度一直百度,后来发现是参数错了,记录一下
-
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(getContext()); builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { // MyService.this.stopSelf(); // if (windowManager != null) windowManager.removeView(view); } }); AlertDialog dialog = builder.create(); dialog.setMessage("我的计数"); dialog.setTitle("提示"); dialog.getWindow().setType( WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); dialog.show();
本文地址:https://blog.csdn.net/u013721227/article/details/108739082
上一篇: ASP.NET Core使用静态文件、目录游览与MIME类型管理
下一篇: JS-BOM操作