我把一个View放在Dialog里面LayoutInflater factory = LayoutInflater.from(Test2Activity.this);
final View textEntryView = factory.inflate(R.layout.dialog_input, null);new AlertDialog.Builder(Test2Activity.this)
.setTitle("账单查询")
.setView(textEntryView)
.setPositiveButton("发送",
new DialogInterface.OnClickListener() { @Override
public void onClick(DialogInterface arg0,
int arg1) {
// TODO Auto-generated method stub
EditText et1 = (EditText) findViewById(R.id.username_edit);
myreply += et1.getText().toString();
Intent replyIntent = new Intent(
Intent.ACTION_SENDTO, Uri
.parse("smsto:" + "139191*****"));
replyIntent.putExtra("sms_body", myreply);
startActivity(replyIntent);
}
})但是这个Dialog在程序中就是出不来。eclipse也不报错