This is probably because you are returning
getItemPosition which is
Called when the host view is attempting to determine if an item’s position has changed. Returns POSITION_UNCHANGED if the position of the given item has not changed or POSITION_NONE if the item is no longer present in the adapter.
So Remove the override of
getItemPosition you don’t need this normally.
Because you are indicating that the current instance of each Fragment is no longer in the list of Fragments it will be cause the Fragment to be re-created each time you visit the Tab that holds it.
CLICK HERE to find out more related problems solutions.