Creating Dynamic UIs with Android Fragments by Jim Wilson

Creating Dynamic UIs with Android Fragments by Jim Wilson

Author:Jim Wilson
Language: eng
Format: epub
Publisher: Packt Publishing


Dynamically managing fragments

The process of dynamically managing fragments commonly involves multiple steps. The steps may be as simple as removing one fragment and adding another, or they may be more complex, involving the removal and addition of multiple fragments. In any case, we need to be certain that all dynamic changes to the fragments within an activity that constitute a shift from one application screen to the next occur together as a single unit of work. Android does this by grouping the steps into transactions using the FragmentTransaction class.

Conceptually, the FragmentTransaction class behaves in a manner consistent with other transaction models:

Start the transaction.

Identify the desired changes.

Commit the transaction once all changes within this unit of work are identified.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.