Skip to content

Add commit to method destroyItem #5

@VladTE

Description

@VladTE

Hi Daniel,

Should you not commit the remove transaction on destroyItem method overriden ?

I mean from :
mCurTransaction.remove(fragment);

to

mCurTransaction.remove(fragment).commit();

at line 124 of UpdatableFragmentPagerAdapter class.

I am having a problem that after onSave/Restore instance of the viewpager, some fragment remain on the memory and are reused even after I create a new adapter... So, every time I put the app on background and then on foreground, the number of the instances of the used fragment from getSupportFragmentManager().getFragments() increases with 2 (I use one OffscreenPageLimit).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions