[英]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.