Merge pull request #503 from FineFindus/feat/profile-note-save-feedback
feat(Profile): display Toast when saving note
This commit is contained in:
commit
13545fd5ef
|
@ -287,11 +287,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||||
noteEdit.setOnFocusChangeListener((v, hasFocus)->{
|
noteEdit.setOnFocusChangeListener((v, hasFocus)->{
|
||||||
if(hasFocus){
|
if(hasFocus){
|
||||||
hideFab();
|
hideFab();
|
||||||
noteEdit.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
|
return;
|
||||||
}else{
|
|
||||||
showFab();
|
|
||||||
savePrivateNote(noteEdit.getText().toString());
|
|
||||||
}
|
}
|
||||||
|
showFab();
|
||||||
|
savePrivateNote(noteEdit.getText().toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
FrameLayout sizeWrapper=new FrameLayout(getActivity()){
|
FrameLayout sizeWrapper=new FrameLayout(getActivity()){
|
||||||
|
@ -469,6 +468,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||||
public void onSuccess(Relationship result) {
|
public void onSuccess(Relationship result) {
|
||||||
updateRelationship(result);
|
updateRelationship(result);
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
|
Toast.makeText(getContext(), R.string.mo_personal_note_saved, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<string name="mo_settings_app_version" translatable="false">Moshidon v%1$s (%2$d)</string>
|
<string name="mo_settings_app_version" translatable="false">Moshidon v%1$s (%2$d)</string>
|
||||||
|
|
||||||
<string name="mo_personal_note">Add a note about this profile</string>
|
<string name="mo_personal_note">Add a note about this profile</string>
|
||||||
|
<string name="mo_personal_note_saved">Note saved</string>
|
||||||
<string name="mo_personal_note_confirm">Confirm changes to note</string>
|
<string name="mo_personal_note_confirm">Confirm changes to note</string>
|
||||||
<string name="mo_personal_note_update_failed">Failed to save note</string>
|
<string name="mo_personal_note_update_failed">Failed to save note</string>
|
||||||
<string name="mo_settings_contribute">Contribute to Moshidon</string>
|
<string name="mo_settings_contribute">Contribute to Moshidon</string>
|
||||||
|
|
Loading…
Reference in New Issue