您應該使用片段來實現這個
與片段在您的項目的點擊
<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:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/white"
android:orientation="vertical">
<FrameLayout
android:id="@+id/frmContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
你應該使用[**可擴展的ListView **](HTTPS更換的FrameLayout:// www.google.co.in/search?client=ubuntu&hs=53U&channel=fs&dcr=0&q=Expandable+listview+github&oq=Expandable+listview+github&gs_l=psy-ab.3..0i10k1j0i22i10i30k1.4760.6623.0.7086.7.7.0.0.0.0 .201.1085.0j5j1.6.0 .... 0 ... 1.1.64.psy-ab..1.6.1080 ... 0.J55HyhqjIU8)for –
我想從菜單導航到抽屜本身的另一個菜單。 –
按照這個https://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/ – Ankita