[英]android - dialog with dynamic listview at top and container at bottom + AutoSize Dialog
实际上,我想要一个在顶部显示列表视图并在底部显示菜单栏的对话框。
我希望对话框将其大小调整为列表视图和底部栏
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg" >
<ListView
android:id="@+id/llList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/illBottom"
android:layout_alignParentTop="true"
android:choiceMode="multipleChoice" >
</ListView>
<com.actionbarsherlock.internal.widget.IcsLinearLayout
android:id="@+id/illBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:paddingLeft="4dip"
android:paddingRight="4dip" >
...
</com.actionbarsherlock.internal.widget.IcsLinearLayout>
将listview设置在illBottom
上方,并且LinearLayout设置为无相对位置,listview不会显示...按照我的方式进行设置,使Dialog始终保持最大大小(ListView的wrap_content不起作用...)
也许内置列表可以为您做到:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setSingleChoiceItems(....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.