I am found it confusing to be able to support multi screens using fragments. I thought the idea was that i could offer more than one version of the activity and that activity could have 1 or more fragments (depending on real estate) statically embedded.
Supporting dynamic fragments where these are added from code rather than embedded <fragment>
element types. How would this be done in code as I wouldn't know the configuration details of the xml from the activity.
Does anyone have an example of this ?
When would I use static or dynamic fragments.
One reason I could foresee using dynamic fragments is to support the retaining on the fragment so the activity could just ask for it in code but I am finding it difficult to understand how this would be supported without the activity (java) knowing exactly what xml files are available
Thanks