不行,会报错 The constructor EditText(new View.OnClickListener(){}) is undefined
不行,会报错 The constructor EditText(new View.OnClickListener(){}) is undefined 放到onclick后就不是this了,是GpsObtainActivity.this
EditText et = new EditText(你的Activity类名.this); AlertDialog.Builder builder = new AlertDialog.Builder(你的Activity类名.this); builder.setTitle("测试").setView(et).create().show();
不行,会报错 The constructor EditText(new View.OnClickListener(){}) is undefined 放到onclick后就不是this了,是GpsObtainActivity.this正解
The constructor EditText(new View.OnClickListener(){}) is undefined
The constructor EditText(new View.OnClickListener(){}) is undefined
放到onclick后就不是this了,是GpsObtainActivity.this
AlertDialog.Builder builder = new AlertDialog.Builder(你的Activity类名.this);
builder.setTitle("测试").setView(et).create().show();
The constructor EditText(new View.OnClickListener(){}) is undefined
放到onclick后就不是this了,是GpsObtainActivity.this正解