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
Post a Comment