1

I am developing android application, which has one login view and one user details view. On login I put user details in SharedPreferences. On the second view I am having reset button. On click on reset button I delete all data in shared preferences and I redirect application on the login page, on login I put user details in shared preferences ,however on second view I see previous user details who was logged on. The problem is that onCreateMethod is not called, but onResume is called.

Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
vikifor
  • 3,426
  • 4
  • 45
  • 75
  • see docs : http://developer.android.com/training/basics/activity-lifecycle/starting.html, this is explaining the lifecycle of an activity – Hacketo Mar 02 '15 at 22:45
  • Probably the Login activity was in the back-stack, and as such was not destroyed. So check this out : http://stackoverflow.com/questions/12947916/android-remove-all-the-previous-activities-from-the-back-stack – Rick Sanchez Mar 02 '15 at 22:48

0 Answers0