In my fragment there are a lot of lines and editing text, and the submit button is for saving data, the reset button is reset for all elements (Editing texts and spinners). I used the following code to reset all controls
FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.detach(this).attach(this).commit();
but it does not clear editext. All spinners are reset, but editext text remains as it is
android android-edittext reset android-fragments fragmentmanager
Rajesh Nasit Jun 16 '17 at 4:50 2017-06-16 04:50
source share