【发布时间】:2011-04-07 06:39:46
【问题描述】:
这是我的代码:
@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中的更多字段。 - 如何在
AlertDialog中启用HorizontalScrollview?
【问题讨论】:
标签: android fullscreen android-alertdialog horizontal-scrolling