SettingsActivity.java 文件源码

java
阅读 38 收藏 0 点赞 0 评论 0

项目:ChatApp-Android 作者:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data){
  super.onActivityResult(requestCode, resultCode, data);
  switch (requestCode){
    case PasswordActivity.ASK_PWD_REQUEST:
      // if I asked for a pwd and the pwd was ok the disable the
      // preference, otherwise enable it again
      ((SwitchPreference) findPreference(getResources().getString(R.string
              .pref_key_enablepwd)))
              .setChecked(resultCode != Activity.RESULT_OK);
      break;
    case ChangePasswordActivity.CHANGE_PWD_REQUEST:
      // if I ask for a pwd change and the password was changed correctly
      // enable the preference
      ((SwitchPreference) findPreference(getResources().getString(R.string
              .pref_key_enablepwd)))
              .setChecked(resultCode == Activity.RESULT_OK);
      break;
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号