Question

how can make right to left sliding menu withSherlockLib? I used this tuturial for slide menue http://www.androidbegin.com/tutorial/implementing-actionbarsherlock-side-menu-navigation-drawer-in-android/

Was it helpful?

Solution

it's solved but not with actionbarcomponents. I used this link to create full right or left side slide menus.

here

after import all helper class to your project you can use it like this:

menu2 = new SlidingMenu(this);
        menu2.setShadowWidth(500);
        menu2.setMode(SlidingMenu.RIGHT); // here u can define witch sides
        menu2.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
        menu2.setBehindOffsetRes(R.dimen.slidingmenu_offset);
        menu2.setFadeDegree(0.35f);
        menu2.setSlidingEnabled(true);
        menu2.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
        Log.i("SLIDE", "p3");

        LayoutInflater layutInflator = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View row_menu = layutInflator.inflate(R.layout.layout_menu_main, null, false);



        RelativeLayout r_menu2 = (RelativeLayout) row_menu.findViewById(R.id.menue_item2_relative);
        RelativeLayout r_menu3 = (RelativeLayout) row_menu.findViewById(R.id.menue_item3_relative);
        RelativeLayout r_menu4 = (RelativeLayout) row_menu.findViewById(R.id.menue_item4_relative);
        RelativeLayout r_menu5 = (RelativeLayout) row_menu.findViewById(R.id.menue_item5_relative);
        RelativeLayout r_menu6 = (RelativeLayout) row_menu.findViewById(R.id.menue_item6_relative);


        r_menu2.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {


            }
        });

   // ... code ur jobs on OnClick of items

        menu2.setMenu(row_menu);   

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top