私は苦労しましSlidingPaneLayout
た。画像に示されているような3つのパネルでアクティビティを作成しようとしています:
パネル 2 をデフォルトで表示したい場合、ユーザーが左から右にスワイプするとパネル 1 が開き、右から左にスワイプするとパネル 3 が開きます。ビューをSlidingPaneLayout
最後に追加すると、デフォルトで表示されます。どのビューを開始ビューにするかを設定する方法はありますか? ここに私のレイアウトxmlがあります:
<android.support.v4.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/side_menu_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/gray"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oliveGreen">
</LinearLayout>
<ListView android:id="@+id/right_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_marginRight="0dp"
android:layout_marginEnd="0dp"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/gray"/>
</android.support.v4.widget.SlidingPaneLayout>
この構成rightDrawer
では、開始ビューとして表示されます。その右側に表示LinearLayout
して設定したい。rightDrawr
私はそれを明確にしたことを願っています。何か助けていただければ幸いです。前もって感謝します。