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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -