I have fragments for 3 states of a screen; Add, Edit and View. In Add, I create an entity and save it. Next time I open it in View mode and set the entity name using
The EditText appears to have an issue with resetting text in onCreateView. So the solution here is to reset the text in onResume. This works.
onCreateView
onResume
Also there's an issue in onActivityCreated. I reset edittext's content in onStart and it works. [credits to @savepopulation]