我想用背景色在xml中制作抽屉,当我打开抽屉时,我看到了背景色,但如果我没有打开抽屉,我看不到背景色。
这就是我的 xml 的样子——
<SlidingDrawer
android:id="@+id/slidingD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:content="@+id/content"
android:handle="@+id/handle"
android:layout_marginTop="150dp">
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="^" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<CheckBox
android:id="@+id/cbSlidable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox" />
</LinearLayout>
</SlidingDrawer>