Although the concept is very simple, I seem to be having difficulty saving the text value of a TextEdit when the orientation of the device changes. When I change the orientation, the text inside my EditText is erased.
The view hierarchy is as follows:
Activity
    View Pager
        Fragment
            Recycler View
                View Holder
                    Edit Text
- I tried setting - freezesTextto- truein the xml layout for the- EditTextto no avail.
- In the fragment, I tried saving the text in - onSaveInstanceState()and restoring in- onActivityCreated(), but it seemed like- onSaveInstanceState()was never getting called.
- In the activity, I tried saving the text in - onSaveInstanceState()and restoring in- onCreate(), but the- EditTextwas null at that point.
- I tried setting - saveEnabledto true in the xml layout for the- EditTextwhich also didn't work.
What am I doing wrong?
 
     
    