5
我正在寻找一种方法来调整AlertDialog
内的EditText
的大小(所以它不会触及边缘)。调整AlertDialog中EditText的大小
我的示例代码
AlertDialog.Builder alert = new AlertDialog.Builder(myActivity.this);
alert.setTitle("Test");
EditText textBox = new EditText(myActivity.this);
alert.setView(textBox);
alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// do nothing
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// do nothing
}
});
alert.show();
我试过没有成功此处提供的解决方案:
谢谢你花时间,这有助于把正确的地方放在正确的地方。 – ThePaul 2012-02-19 01:39:21