android带输入框的Dialog
16lz
2022-03-16
private void showBuilder(String title) {
Builder builder = new Builder(this);
builder.setIcon(android.R.drawable.ic_dialog_info);
builder.setTitle(title);
builder.setPositiveButton("发送", new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builder.setNegativeButton("返回", new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
View layout = getLayoutInflater().inflate(R.layout.dialog_comment, (ViewGroup) findViewById(R.id.comment_dialog_layout));
builder.setView(layout);
builder.show();
}
Builder builder = new Builder(this);
builder.setIcon(android.R.drawable.ic_dialog_info);
builder.setTitle(title);
builder.setPositiveButton("发送", new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
builder.setNegativeButton("返回", new android.content.DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
View layout = getLayoutInflater().inflate(R.layout.dialog_comment, (ViewGroup) findViewById(R.id.comment_dialog_layout));
builder.setView(layout);
builder.show();
}
更多相关文章
- Android双击返回键退出程序
- android 事件分发
- android 调用系统图片浏览器并返回图片路径
- 一个android访问http资源的便捷工具类――HttpHelper
- android 之 读取本地json文件返回string
- Android(安卓)获取时间实时更新UI
- Android(安卓)使用URLConnection提交请求
- android中用socket 接收服务器的消息
- Android(安卓)使用 Gmail 来发送邮件