【发布时间】:2012-08-09 09:55:26
【问题描述】:
我有这个问题两天了,我找不到任何解决方案。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/presentation_list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/presentation_list"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="horizontal" >
<Button
android:id="@+id/handle"
android:layout_width="40dp"
android:layout_height="fill_parent"
android:background="@android:color/darker_gray" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/content_imageview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" />
</LinearLayout>
</SlidingDrawer>
我有一个非常简单的布局,带有 listview 和 slidingdrawer,我想通过 listview 来。当我打开我的activity 时没有任何信息,它显示完美无一例外。
但是当我的listview 中有一个项目时,我的slidingdrawer 给出了一个例外。
AndroidRuntime(4722): java.lang.RuntimeException: SlidingDrawer cannot have UNSPECIFIED dimensions
我已经为此搜索了很多次解决方案,但没有一个对我有用。
有没有人对我有出色的突破?非常感谢!
【问题讨论】:
-
我的布局现在有效,更新了我的问题以匹配布局。
标签: android listview dimensions slidingdrawer