Вот мой код:
@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
?