Android 应用开发笔记 - 对话框(AlertDialog)
跟大部分Windows对话框组成相同,只不过我们是实现Builder接口而已。
主要代码如下:
[java]
Builder dialog = new AlertDialog.Builder(MainActivity.this);
dialog.setTitle("Hint");
dialog.setMessage("This is Message!");
dialog.setPositiveButton("Ok", this);
dialog.show();
Builder dialog = new AlertDialog.Builder(MainActivity.this);
dialog.setTitle("Hint");
dialog.setMessage("This is Message!");
dialog.setPositiveButton("Ok", this);
dialog.show();
运行效果:
补充:移动开发 , Android ,