Reputation: 3330
Is it possible to use the SlidingMenu (seen https://github.com/jfeinstein10/SlidingMenu) without the use of fragments? In my app i am using GreenDroid, and seeing it doesn't yet have support for GDFragmentActivities or anything of the sort. So i am just using the example of attaching the SlidingMenu to my activity using the following code:
SlidingMenu slide = new SlidingMenu(this );
slide.setMode(SlidingMenu.LEFT);
slide.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
slide.setTouchModeBehind(SlidingMenu.TOUCHMODE_FULLSCREEN);
slide.setBehindOffset(150);
slide.setFadeDegree(0.3f);
slide.setShadowWidth(5);
slide.setOnClickListener(this);
slide.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
slide.setMenu(R.layout.simpleframelayout);
ListView v = (ListView)slide.getMenu().findViewById(R.id.simpleFrameLayoutList);
v.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, new String[]{"Hello"}));
My problem is that though this will make the SlidingMenu appear properly, the ListView will be completely unresponsive to any touches. I was wondering if there were anything i could possibly be missing or if in fact i definitely do need to use fragments?
Cheers
Upvotes: 2
Views: 2027
Reputation: 1132
Instead of this
(ListView)slide.getMenu().findViewById(R.id.simpleFrameLayoutList);
Try this
(ListView)findViewById(R.id.simpleFrameLayoutList);
It worked for me
Upvotes: 3