여기 내가 그 코멘트에서 말한 서랍의 한 예가 있습니다. 당신은 서랍 레이아웃 및 목록보기 및 viewpager로 자녀가있는 경우,이 레이아웃이 모양을하는 방법입니다
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#333333"
tools:context=".MainActivity" >
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- This List View for the sliding menu -->
<LinearLayout
android:id="@+id/list_slidermenu"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:orientation="vertical" >
<!-- If you want to add some more things to your navigation drawer -->
<!-- <EditText
android:id="@+id/search_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:hint="Search"
android:maxLines="1" >
</EditText> -->
<ListView
android:id="@+id/list_slidermenu_child"
android:layout_width="250dp"
android:layout_height="match_parent"
android:background="#303030"
android:choiceMode="singleChoice"
android:divider="#272727"
android:dividerHeight="3dp"
android:listSelector="@drawable/list_selector"
android:padding="5dp" />
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
그리고이 레이아웃의 모양 방법입니다 : 이제
Test Image http://imageshack.com/a/img22/9166/qh8h.png
, 예를 들어, 목록의 항목을 클릭하면 뷰 페이저는 해당 뷰를 설정합니다.
원하는 방식입니까?
여기에 새로운 이미지는 다음과 같습니다
Test Image http://imageshack.com/a/img600/4421/2khw.png
그리고 탐색의 항목 중 어느 하나의 클릭에
, 그것은 뒤에보기에 그 내용을 표시?
탐색함에 드로잉 조각을 사용하지 않아도됩니다. 드로어 레이아웃에 FragmentViewPager를 사용할 수 있습니다.이 조각에는 조각이 포함될 수 있지만 UX 디자인에 대해 생각해보십시오. 당신 (/ 당신의 사용자)이 원하는 것. – ataulm
그게 바로 .. 서랍 레이아웃을 사용하고 자식보기를 설정하면, 당신이하려는 것을 쉽게 달성 할 수 있습니다. – mike20132013