1
我不明白爲什麼在這樣的佈局黑盒子不填充textview和slidingdrawer句柄元素之間的區域。SlidingDrawer句柄不可見
如果我交換嵌入的linearlayout和slidingdrawer我看不到處理元素。
請幫我解決這個問題。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:orientation="vertical" >
<TextView
android:id="@+id/event_tv_title"
style="@style/EventTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<SlidingDrawer
android:id="@+id/event_sd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="vertical"
android:background="#00000000" >
<TextView
android:id="@+id/handle"
style="@style/TheatreRow"
android:text="@string/schedule"/>
<TextView
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="text" />
</SlidingDrawer>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
</LinearLayout>
</LinearLayout>
問題是,如果我設置的android:layout_height = 「FILL_PARENT」 爲event_tv_title我slidingdrawer是不可見的 – 2012-03-22 08:04:17
謝謝,我已經找到了解決方案。我應該使用FrameLayout作爲根元素而不是linearLayout。 – 2012-03-22 08:47:11
@VasilYaroshevich:如果你找到解決方案,那麼接受答案,這樣可以幫助他人。 – 2012-03-22 08:53:39