android_guides icon indicating copy to clipboard operation
android_guides copied to clipboard

How save data(For Example EditText ) in Fragment

Open dliasaitov opened this issue 7 years ago • 2 comments

How can I save changes in text fields when switching fragments, I need to return to the fragment to obtain data that the user entered before switching

dliasaitov avatar Aug 21 '17 18:08 dliasaitov

I would think callback method still works?

DroidSoul avatar Aug 22 '17 22:08 DroidSoul

used android shared preference on click save data and back previous fragment check onResume function shared preference if value exist mEditText.setText(mSharedPreference_value);

mirzaadil avatar Nov 07 '17 14:11 mirzaadil