notify success

This commit is contained in:
houxg
2016-11-23 14:56:26 +08:00
parent 252dcdbfc0
commit 0937b558b1
2 changed files with 7 additions and 2 deletions

View File

@@ -230,6 +230,7 @@ public class SettingsActivity extends BaseActivity {
Account account = AccountService.getCurrent();
account.setUserName(username);
account.update();
ToastUtils.show(SettingsActivity.this, R.string.change_user_name_successful);
} else {
mUserNameTv.setText(AccountService.getCurrent().getUserName());
ToastUtils.show(SettingsActivity.this, R.string.change_user_name_failed);
@@ -257,6 +258,8 @@ public class SettingsActivity extends BaseActivity {
public void onNext(BaseResponse baseResponse) {
if (!baseResponse.isOk()) {
ToastUtils.show(SettingsActivity.this, R.string.change_password_failed);
} else {
ToastUtils.show(SettingsActivity.this, R.string.change_password_successful);
}
}
});

View File

@@ -19,13 +19,13 @@
<string name="recent_notes">Recent notes</string>
<string name="clear_data">Clear data</string>
<string name="are_you_sure_to_delete_all_data_in_this_account">Are you sure to delete all notes and notebooks in this account?</string>
<string name="change_user_name">Change username</string>
<string name="change_user_name">Change user name</string>
<string name="change_password">Change password</string>
<string name="log_out">Log out</string>
<string name="are_your_sure_to_log_out">Are you sure to log out?</string>
<string name="choose_editor">Choose editor</string>
<string name="clear_data_successful">Clear data successful</string>
<string name="change_user_name_failed">Change username failed</string>
<string name="change_user_name_failed">Change user name failed</string>
<string name="change_password_failed">Change password failed</string>
<string name="choose_notebook">Choose notebook</string>
<string name="delete_note_failed">Delete note failed</string>
@@ -60,4 +60,6 @@
<string name="version">Version</string>
<string name="about">About</string>
<string name="preview">Preview</string>
<string name="change_password_successful">Change password successful</string>
<string name="change_user_name_successful">Change user name successful</string>
</resources>