예제 #1
0
 private void saveLocalSharedPrefs(String username, String password) {
   SharedPrefEntry entry = new SharedPrefEntry(username, password);
   boolean isSuccess = sharedPrefsHelper.savePersonalInfo(entry);
   if (isSuccess) {
     Logger.d("Personal information saved");
   } else {
     Logger.d("Failed to write personal information to SharedPreferences");
   }
 }
예제 #2
0
 private void populateUi() {
   SharedPrefEntry sharedPrefEntry = sharedPrefsHelper.getPersonalInfo();
   etUsername.setText(sharedPrefEntry.getName());
   etPassword.setText(sharedPrefEntry.getPassword());
 }