0

实际上,我想要一个在顶部和底部菜单栏显示列表视图的对话框......

我希望对话框将其大小调整为列表视图和底栏

<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>

将列表视图设置为上方illBottom且将 LinearLayout 设置为无相对位置,列表视图未显示...按照我的方式设置,使对话框始终为最大尺寸(ListView 的 wrap_content 不起作用...)

4

1 回答 1

0

也许内置列表会为您完成:

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setSingleChoiceItems(....
于 2013-01-16T10:42:33.130 回答