Here\'s my xml:
You can do it by using SharedPreference, Static variables or by Application class which will helps you in keeping the state of the User
you should save the login credentials in sharedPreferences or Sqlite and on login activity check if you find any saved data then login with the saved data else ask user for credentials..