これが私のコードです:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
context = this;
AlertDialog alertChoice = new AlertDialog.Builder(context).create();
alertChoice.setTitle("Title");
alertChoice.setView(ViewDialogScreen("Test"));
alertChoice.show();
}
private View ViewDialogScreen(String strText) {
LinearLayout llay = new LinearLayout(context);
llay.setLayoutParams(new LayoutParams(320, 400));
TextView tv = new TextView(context);
tv.setText(strText);
llay.addView(tv);
return llay;
}
上記のような出力が得られました。
AlertDialog
全画面表示/画面サイズの95%で表示する必要があります。- でより多くのフィールドを処理する必要があります
Dialog
。 HorizontalScrollview
を有効にするにはどうすればよいAlertDialog
ですか?