I am using this layout for a two panel UI :
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/sp"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/leftPane"
android:name="com.sample.SearchFragment"
android:layout="@layout/search_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left"
>
</fragment>
<fragment
android:id="@+id/rightPane"
android:name="com.sample.DetailFragment"
android:layout="@layout/detail_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right"
>
</fragment>
</android.support.v4.widget.SlidingPaneLayout>
Problem is, the rightPane
is always showing up as maximised at the start, I want the left to show first, if I swap them around then the left shows first but the swipe works in the wrong direction.
I would like it to be like the Hangouts app. Which setting do I change?
I want it to show up at the start like so :
+---------------------+---+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+---------------------+---+