I've implemented and Navigation Drawer which is currently appearing on the left side of the screen - however I'd like it to appear on the right side of the screen (with it's icon in the upper right hand corner of the screen as well - currently it is in the top left). I found the following SO article which explains how to do so:
http://stackoverflow.com/questions/18547277/how-to-set-navigation-drawer-to-be-opened-from-right-to-left/19358114#19358114
However when I attempt to implement the code the Navigation Drawer still appears on the 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:
If there is any additional information necessary I will be more than happy to provide it (I'm just stumped as to why the NavBar isn't appearing on the right side of the screen)