I ran into a road block when I was adding the sliding drawer widget to my layout. I added it and everything works fine. The problem is that when I have a layout that is fills the height the sliding drawer’s handle is no longer visible. Is there a way to make the handle visible by putting it in the foreground or maybe another way to achieve this?
The example that I am playing with is from:
https://mobibear.wordpress.com/2010/07/12/android-slidingdrawer-with-custom-view/
All I edited from the above site is the .xml file below. Thank you ahead of time, I will be standing by….
<?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>
I ended up finding the answer to this question and it was as simple as adding all the Views/Layouts in a relative layout and making sure the sliding drawer is the final addition. Here is the link to where the answer lies:
Sliding drawer in the same layout