I would like to create an AlertDialog
similar to this figure. I can't resize the EditText
view. How do I resize it?
alert = new AlertDialog.Builder(this);
alert.setTitle("Enter Destination");
alert.setIcon(R.drawable.icon);
final EditText editAddress = new EditText(this);
editAddress.setLayoutParams(new LayoutParams(200, 20));
alert.setView(editAddress);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
}
});
alert.show();