我有一个AlertDialog里面的ListView,我遇到的问题是ListView只显示一行,即使在ListView中有多行。 AlertDialog似乎不会扩展。我怎样才能让它显示尽可能多的行?Android:在AlertDialog中的ListView只显示一行
在此先感谢。
约翰尼
我有一个AlertDialog里面的ListView,我遇到的问题是ListView只显示一行,即使在ListView中有多行。 AlertDialog似乎不会扩展。我怎样才能让它显示尽可能多的行?Android:在AlertDialog中的ListView只显示一行
在此先感谢。
约翰尼
HIII约翰尼
我看到你的问题,然后我测试了很多演示的最后我得到了那个
这里的解决方案,我可以把链接,对你有帮助,你可以测试他们
http://android-codes-examples.blogspot.in/2011/03/how-to-display-alertdialog-and.html
最终的CharSequence []项= { “富”, “酒吧”, “巴兹”};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Make your selection");
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
// Do something...
}
});
AlertDialog alert = builder.create();
alert.show();
请参考以下职位列表视图一个警告对话框中:link
什么代码产生这样的AlertDialog? – dira 2012-03-14 04:19:27