Exemplo n.º 1
0
  protected void onResume() {
    super.onResume();
    mGameSettings.getString(GAME_PREFERENCES_USERNAME, null);
    mGameSettings.getString(GAME_PREFERENCES_SCHOOL, null);
    if (mGameSettings.contains(GAME_PREFERENCES_AVATAR)) {
      String img = mGameSettings.getString(GAME_PREFERENCES_AVATAR, null);
      Uri path = Uri.parse(img);
      ImageButton ava = (ImageButton) findViewById(R.id.avatar);
      ava.setImageURI(null);
      ava.setImageURI(path);
    }
    if (mGameSettings.contains(GAME_PREFERENCES_DOB)) {
      long dtDob = mGameSettings.getLong(GAME_PREFERENCES_DOB, 0);
      TextView dob = (TextView) findViewById(R.id.ShowDate);
      dob.setText(DateFormat.format("MMMM dd, yyyy", dtDob));
    }

    final EditText usernameText = (EditText) findViewById(R.id.EnterUsername);
    usernameText.setText(mGameSettings.getString(GAME_PREFERENCES_USERNAME, null));
    final EditText emailText = (EditText) findViewById(R.id.enterschool);
    emailText.setText(mGameSettings.getString(GAME_PREFERENCES_SCHOOL, null));

    TextView passwordInfo = (TextView) findViewById(R.id.ShowPassword);
    passwordInfo.setText(mGameSettings.getString(GAME_PREFERENCES_PASSWORD, null));
  }