burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.13k stars 991 forks source link

Drawing is not stored for orientation change #302

Closed adn1997 closed 3 years ago

adn1997 commented 3 years ago

I've got an activity including the PhotoEditorView. If I put some drawings or text on the view and change the orientation from my device, e.g. from portrait to landscape, all previous drawings disappear.

It wasn't possible for me to store that drawings from outside the library.

burhanrashid52 commented 3 years ago

The library does not handle the config changes. You can try putting in a fragment and set setRetainInstance as true.

adn1997 commented 3 years ago

I tried this and the result you can see in the screenshots. The position and size doesn't fit to the picture anymore. Before rotating photo_2021-01-12 10 08 46 After rotating photo_2021-01-12 10 08 52

burhanrashid52 commented 3 years ago

Interesting. Currently, I don't have the bandwidth to add that feature. PRs are welcome. Also, can you explain a use case here of rotating the screen while editing?

burhanrashid52 commented 3 years ago

closing due to no acitivty