Skip to content

Instantly share code, notes, and snippets.

@YvesBill
Created January 6, 2014 20:12
Show Gist options
  • Save YvesBill/8289081 to your computer and use it in GitHub Desktop.
Save YvesBill/8289081 to your computer and use it in GitHub Desktop.
case 0:
//Close Drawer
mDrawerList.setItemChecked(position, true);
setTitle(mStringTitles[position]);
mDrawerLayout.closeDrawer(mDrawerView);
//Wait 270 milliseconds for change fragment view
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_id_to_replace, new Fragment())
.commit();
}
}, 270);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment