AlertDialog中获取edittext的数据
LayoutInflaterlayoutInflater=LayoutInflater.from(this);ViewcheckpointView=layoutInfla...
LayoutInflater layoutInflater = LayoutInflater.from(this);
View checkpointView = layoutInflater.inflate(R.layout.checkpoint, null);
AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity.this);
EditText eta=(EditText)checkpointView.findViewById(R.id.checkanswer);
final String texta = eta.getText().toString().trim();
System.out.println(textq);//并不能得到输出值,是为什么 展开
View checkpointView = layoutInflater.inflate(R.layout.checkpoint, null);
AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity.this);
EditText eta=(EditText)checkpointView.findViewById(R.id.checkanswer);
final String texta = eta.getText().toString().trim();
System.out.println(textq);//并不能得到输出值,是为什么 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询