Files
notes_estom/Android/Dialog.md
yinkanglong_lab 07485a7f54 Android&PHP
2021-03-09 19:48:29 +08:00

17 lines
756 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**\>对话框**
- AlertDialog
1. 组成:包括图标区、标题区、内容区、按钮区
2. 使用步骤:定义对象-\>设定标题-\>设定图标-\>设定对话框的内容-\>设置按钮-\>创建对象
3. 相关方法setTitle();setCustomTitle();setIcon();setPositiveButton();setNegativeButton;setNeutralButton();setMessage();setItems();setSingelChoiceItems();setAdapter();setView()
遇到的问题:
android:theme=”@android:style/Theme.Material.Dialog.Alert在manifest.xml中修改视图的主题失败导致软件不能启动
View root =
this.getLayoutInflater().inflate(R.layout.popup,null);这句话的具体意图没有搞明白,似乎是把某个视图声明为子视图。