Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement two level slidingmenu in Android using jfeinstein10 / SlidingMenu?

Tags:

I want to create 2 level sliding menu in android. When i click on the first sliding menu item i need to show another sliding menu on the left to it. I created the first level sliding menu using the following code.

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/menu_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ListView    
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="@dimen/list_padding"
        android:paddingRight="@dimen/list_padding" />

</FrameLayout> 

Code Part

SlidingMenu menu;
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setShadowWidth(10);
menu.setFadeDegree(0.0f);
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
menu.setBehindWidth(200);
menu.setMenu(R.layout.menu_frame);

How to proceed to make the 2nd level sliding menu?