我将此布局用于两个面板 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>
问题是,在rightPane
开始时总是显示为最大化,我希望左边首先显示,如果我交换它们,那么左边首先显示,但滑动方向错误。
我希望它像环聊应用一样。我要更改哪个设置?
I want it to show up at the start like so :
+---------------------+---+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+---------------------+---+