updating harmony remote - Updating data source

Fragment Manager does not hold the fragments which are going off the screen and simply destroys it.

In this way new fragments gets new data from the object collection directly.

In simplest implementation, we return View or Fragment created in instantiate Item(View Group, int) itself and in is View From Object(View, Object) method we simply compare View and Object to check the association between them.

My Pager If the number of fragments are large, it will take a lot of memory if we use Fragment Pager Adapter because it never destroys the Fragments once created.

Same thing is true for Pager Adapter as well and we only override get Item Position() in order to update the view with new data because Fragment Pager also destroys the views going off the screen.

For better understanding of the process, please download the sample source code from here , run the android application and go through the code.

It only destroys fragments’s view hierarchy and keeps its state internally.

Last modified 29-Nov-2019 13:00