android - change user's name in navigation menu when user logs in -


i have navigation menu , in header of there textview shows user name when he/she logs application(like gmail app).

unfortunately when user logs in loginactivity , goes mainactivity textview doesn't change , have restart app change text. (i used sharedpreferences save user name)

how can solve problem??

when come mainactivity, the textview must updated. can in onresume() of mainactivity.

take user's name , put in textview of navigation drawer.

i think have abstract activity manages navigation drawer ? must update navigation drawer in onresume() of abstract activity, in case in activity name updated when activity come in front.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -