siwangqishiq / ImageEditor-Android

AndroidImageEdit 安卓设备上图形编辑开源控件,支持磨皮美白 自定义贴图 图片滤镜 图片旋转 图片剪裁 文字贴图 撤销 回退 等操作
2.18k stars 567 forks source link

Fragments are recreating multiple times #75

Closed NareshAskani closed 5 years ago

NareshAskani commented 5 years ago

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.

siwangqishiq commented 5 years ago

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

NareshAskani commented 5 years ago

thank you very much, its working :)