case R.id.btn_update_password: {
//1.获取输入框的值
String now = et_now.getText().toString().trim();
String news = et_new.getText().toString().trim();
String new_password = et_new_password.getText().toString();
//2.判断是否为空
if (!TextUtils.isEmpty(now) & !TextUtils.isEmpty(news) & !TextUtils.isEmpty(new_password)) {
//3.判断两次新密码是否一致
if (news.equals(new_password)) {
//4.重置密码
MyUser.updateCurrentUserPassword(now, news, new UpdateListener() {
@Override
public void done(BmobException e) {
if (e == null) {
Toast.makeText(ForgetPasswordActivity.this,
R.string.reset_successfully, Toast.LENGTH_SHORT).show();
finish();
} else {
Toast.makeText(ForgetPasswordActivity.this, R.string.reset_failed, Toast.LENGTH_SHORT).show();
}
}
});
} else {
Toast.makeText(this, getString(R.string.text_two_input_not_consistent), Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(this, getString(R.string.text_tost_empty), Toast.LENGTH_SHORT).show();
}
break;
}
}
}
老师好,我看教程这个代码逻辑,只获取了密码,它怎么知道去修改哪个用户的?