Though i have been looking around, couldn\'t find the correct answer. In my navigation drawer header I provide user with his image and name, But i also allow the user to cha
Though I am really sorry for posting the answer this late. I resolved my problem by refreshing the header whenever I open the drawer or we can when onDrawerOpened is called.
mDrawerToggle = new ActionBarDrawerToggle(Homepageactivity.this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close) {
/** Called when a drawer has settled in a completely closed state. */
public void onDrawerClosed(View view) {
super.onDrawerClosed(view);
getSupportActionBar().setTitle(mTitle);
invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
}
/** Called when a drawer has settled in a completely open state. */
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
getSupportActionBar().setTitle(mDrawerTitle);
session = new SessionManager(getApplicationContext());
user = session.getUserDetails();
profilepic.setImageBitmap(StringToBitMap(user.get(SessionManager.KEY_PROFILEPIC)));
name.setText(user.get(SessionManager.KEY_NAME));
lastsynced.setText(lastsynced());
invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
}
};