如何制作android';在前景中可以看到哪个滑动抽屉?
我在布局中添加滑动抽屉小部件时遇到了一个路障。我添加了它,一切都很好。问题是,当我有一个充满高度的布局时,滑动抽屉的把手不再可见。有没有一种方法可以通过将手柄放在前景中使其可见,或者是另一种方法来实现这一点 我正在使用的示例来自: 我从上面的站点编辑的所有内容都是下面的.xml文件。提前谢谢你,我会随时待命如何制作android';在前景中可以看到哪个滑动抽屉?,android,android-layout,slidingdrawer,Android,Android Layout,Slidingdrawer,我在布局中添加滑动抽屉小部件时遇到了一个路障。我添加了它,一切都很好。问题是,当我有一个充满高度的布局时,滑动抽屉的把手不再可见。有没有一种方法可以通过将手柄放在前景中使其可见,或者是另一种方法来实现这一点 我正在使用的示例来自: 我从上面的站点编辑的所有内容都是下面的.xml文件。提前谢谢你,我会随时待命 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.an
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linear"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Blah Blah Title"
android:gravity="center"
android:textSize="38dp"/>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</FrameLayout>
<SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:handle="@+id/handle"
android:content="@+id/content">
<bear.exmaple.CustomView
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</bear.exmaple.CustomView>
<ImageView android:id="@id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/tray_handle_normal" />
</SlidingDrawer>
</LinearLayout>
我最终找到了这个问题的答案,它非常简单,只需将所有视图/布局添加到一个相对布局中,并确保滑动抽屉是最后添加的。以下是答案所在的链接: