android - Dual sided DrawerLayout, Left side works - Right doesn't -
i using drawerlayout. have 2 listview both side. left side working clicking left-top corner button on actionbar. right side working too.but right side working sliding left right swipe. want put button right-top corner of actionbar open right side (just left-top button on actionbar). how can that?
here actionbardrawertoggle codes using;
public class mainactivity extends actionbaractivity { private actionbardrawertoggle mdrawertoggle; //.... protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); //.... getsupportactionbar().setdisplayhomeasupenabled(true); mdrawertoggle = new actionbardrawertoggle(this, mdrawerlayout, r.drawable.sidebar, r.string.drawer_open, r.string.drawer_close) { public void ondrawerclosed(view view) { invalidateoptionsmenu(); toast.maketext(getapplicationcontext(),"menu closed",toast.length_short).show(); } public void ondraweropened(view drawerview) { invalidateoptionsmenu(); toast.maketext(getapplicationcontext(),"menu opened",toast.length_short).show(); } }; mdrawerlayout.setdrawerlistener(mdrawertoggle); } }
Comments
Post a Comment