siwangqishiq/ImageEditor-Android

Fragments are recreating multiple times

Closed this issue · 2 comments

Hi,
your code really helpful,

And i found small issue in this application could you address the solution for this.
MenuFragments are recreating every time. in detail
For the first time

  1. MainMenuFragment creating instance for all this
    StickerFragment
    AddTextFragment
    RotateFragment
    PaintFragment
  2. Second time when i click back button from any other fragments this recreating again sticker fragment.
    MainMenuFragment
    StickerFragment
  3. Third time when i click on TextFragment it's recreated three fragments like below
    AddTextFragment
    RotateFragment
    PaintFragment

could you clarify or give any hint on this. note: i tried this by putting Log.d at onCreateView of every fragment.

You can set bottomGallery setOffscreenPageLimit , code --> EditImageActivity.java / line 173 open this code bottomGallery.setOffscreenPageLimit(7);

thank you very much, its working :)