Unable to Implement a Navigation Drawer on the Right Side of The Screen - Android / Java -


i've implemented , navigation drawer appearing on left side of screen - i'd appear on right side of screen (with it's icon in upper right hand corner of screen - in top left). found following article explains how so:

http://stackoverflow.com/questions/18547277/how-to-set-navigation-drawer-to-be-opened-from-right-to-left/19358114#19358114 

however when attempt implement code navigation drawer still appears on left side.

source (snippet):

@override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.ss_home); 

...

     mdrawerlist = (listview) findviewbyid(r.id.drawer_list);      mdrawer = ( linearlayout) findviewbyid(r.id.drawer);       mdrawerlayout = (drawerlayout)findviewbyid(r.id.drawer_layout);        madapter = new simpleadapter(this, mlist, r.layout.drawer_layout, from, to);      mdrawertoggle = new actionbardrawertoggle(this, mdrawerlayout, r.drawable.icon_list_top_right , r.string.drawer_open){           @override             public boolean onoptionsitemselected(menuitem item) {                 if (item != null && item.getitemid() == android.r.id.home) {                     if (mdrawerlayout.isdraweropen(gravity.right)) {                         mdrawerlayout.closedrawer(gravity.right);                     } else {                         mdrawerlayout.opendrawer(gravity.right);                     }                  }                 return false;             } 

xml layout files/source:

http://pastebin.com/nhskgccb

if there additional information necessary more happy provide (i'm stumped why navbar isn't appearing on right side of screen)

the android:layout_gravity="start" on linearlayout id="drawer" should set android:layout_gravity="end".

sidenote: xml structure poorly constructed, why id="drawer" , id="left_drawer" viewgroups's siblings - , not nested? why framelayout id="content_frame" empty?


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -