Android - How the state of views are preserved during Fragment Transforamtion -


this confuses me lot.

i had 2 fragments, , use fragmenttransaction.replace() swap 2 fragments. state of input controls radiogroup , checkbox preserved when switch other fragments , switch again.

enter image description here.

i set break point on oncreateview() of fragment, , every swap seems trigger method , new views created each time. savedinstancebundle null well. since new views created, how state of old views?

public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) {     view v =  inflater.inflate(r.layout.fragment_fieldsetup_marking, container, false);    // ...  return v; } 

this effect fine app, want know how implemented.

  1. where states stored?
  2. where android sdk code restore (i can not find in class fragmenttransection).


Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -