AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setIcon(R.drawable.alert_dialog_icon);
builder.setTitle(R.string.alertitle);
//Dialog上面使用View布局
LayoutInflater inflater = LayoutInflater.from(this);
final View textEntryView = inflater.inflate(R.layout.form,null);
builder.setView(textEntryView);
本文介绍如何使用AlertDialog.Builder创建带有自定义视图的警告对话框。通过LayoutInflater加载自定义布局,并将其设置为对话框的内容视图,实现更丰富的交互界面。
3366

被折叠的 条评论
为什么被折叠?



