AlertDialog对话框小结
来源:互联网 发布:手机音乐闪光灯软件 编辑:程序博客网 时间:2024/06/07 00:08
每次做对话框都要百度半天
今天在这里总结一下
AlertDialog.Builder builder = new AlertDialog.Builder(PreviewActivity.this);final AlertDialog alertDialog = builder.create();//创建后立即显示alertDialog.show();//设置软键盘可见alertDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);//设置对话框的布局View view = LayoutInflater.from(PreviewActivity.this).inflate(R.layout.dialog_account, null);alertDialog.setContentView(view);//设置对话框不可被取消alertDialog.setCancelable(false);
Button btn_cancel_dialog = (Button) view.findViewById(R.id.btn_cancel_dialog);
//取消按钮的点击事件,确定按钮同理btn_cancel_dialog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); }});
0 0
- AlertDialog对话框小结
- AlertDialog对话框
- 对话框 AlertDialog
- 对话框AlertDialog
- AlertDialog对话框
- AlertDialog对话框
- AlertDialog对话框
- AlertDialog对话框
- AlertDialog对话框
- AlertDialog(对话框)
- AlertDialog(对话框)
- AlertDialog对话框
- AlertDialog对话框
- 对话框AlertDialog
- AlertDialog(对话框)
- AlertDialog对话框
- AlertDialog对话框
- Android中的对话框AlertDialog
- 润乾报表autobig标签展现、打印、导出问题总结
- oracle 数据类型
- 高斯消元
- android 多媒体和相机详解八
- Tensorflow saver(save weight)
- AlertDialog对话框小结
- H264编码技术
- Retrofit2.0使用详解
- oracle 外部表详解
- 如何查找程序中的逻辑错误
- C++访问控制符详解
- CRC32算法实现
- poj1364King_差分约束系统
- 页面输出换行的问题