2017-09-14 3 views
-1

画像で簡単に説明できるようにしましょう。私はこのようなデフォルトのメニューを含むnavigationviewを持っています。ナビゲーションドロワーのデフォルトメニューの項目をクリックすると別のメニューを開く方法

default menu in navigation view

私はアイテムをクリックした場合、それは引き出し自体に別のメニューを開く必要があります。

This is the Menu after selecting an item

私はここ数日以来、いくつかのR & Dをやってますが任意のアイデアを取得することができませんでしてきました。私は自分でそれをしたいので、私はちょうどこれを行うためのヒントをしたい。

ありがとうございます。

+1

のクリックであなたの断片とでframeLayoutを交換して達成するためのフラグメントを使用する必要があります[**拡張可能なリストビュー**](https://で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)これは –

+0

私は、メニューからドロワ自体の別のメニューにナビゲートしたい。 –

+0

このhttps://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/ – Ankita

答えて

0

あなたはこの

はあなたが使用する必要がありますあなたの商品

<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> 
関連する問題