我有一个 SlidingPaneLayout,它在左侧窗格中包含一个片段。
<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity$DummySectionFragment"
>
<fragment
android:name="com.bolldorf.cnpmoebel.widgets.PlaceChooserFragment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/fragment_place_chooser"
tools:layout="@layout/fragment_place_chooser"
android:layout_weight="0.3" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
< ... more stuff here ... >
</RelativeLayout>
</android.support.v4.widget.SlidingPaneLayout>
该片段不是很宽,但它的宽度可以稍微改变,因为它由动态加载的微调器组成。
显示完整片段后,如何让 SlidingPaneLayout 停止打开?
澄清:在面板滑出之前,我可以看到整个右侧(或xml中的底部)窗格,而左侧窗格被隐藏了。
滑动后,当它向右移动时,我可以看到大约 10% 的右侧窗格,以及 90% 的左侧窗格。
我希望看到左侧窗格的 30% 和右侧窗格的 60%,即我希望滑动移动更快停止。