Search code examples
androidlayoutandroid-widgetslidingdrawer

How to make an Android SlidingDrawer slide out from the left?


I'm using a slidingDrawer in my application that has its handler placed at the bottom when in portrait mode. When the user switches to landscape mode (widescreen) I would like to have the handler located on the left. When I change the orientation from vertical to horizontal, the handler is placed on the right.

I have defined my layout XML like this:

<SlidingDrawer
    android:id="@+id/l_drawer"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:handle="@+id/l_handle"
    android:content="@+id/l_content"
    android:orientation="horizontal"
    android:layout_gravity="left"
    >

Anyone have an idea for how to make it slide from left to right ?


Solution

  • I don't think you can, other than perhaps by grabbing the SlidingDrawer source code, making changes to it, and using your modified version. You similarly cannot make a SlidingDrawer that descends from the top.