如何获取edittext中的值 android
1个回答
展开全部
final View DialogView = a .inflate ( R.layout.loand, null);
//创建对话框
AlertDialog dlg = new AlertDialog.Builder(loand.this)
.setTitle("登录框")
.setView(DialogView)//设置自定义对话框的样式
.setPositiveButton("登陆", //设置"确定"按钮
new DialogInterface.OnClickListener() //设置事件监听{
public void onClick(DialogInterface dialog, int whichButton){editText1 =(EditText) DialogView.findViewById(R.id.editText1);
editText2 =(EditText) DialogView.findViewById(R.id.editText2);
String id = editText1.getText().toString();
String password = editText2.getText().toString();
//输入完成后,点击“确定”开始登陆c_log judge = new c_log();
//创建对话框
AlertDialog dlg = new AlertDialog.Builder(loand.this)
.setTitle("登录框")
.setView(DialogView)//设置自定义对话框的样式
.setPositiveButton("登陆", //设置"确定"按钮
new DialogInterface.OnClickListener() //设置事件监听{
public void onClick(DialogInterface dialog, int whichButton){editText1 =(EditText) DialogView.findViewById(R.id.editText1);
editText2 =(EditText) DialogView.findViewById(R.id.editText2);
String id = editText1.getText().toString();
String password = editText2.getText().toString();
//输入完成后,点击“确定”开始登陆c_log judge = new c_log();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |