Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make possible to add a Bitmap to FreeDrawView #8

Closed
csbenz opened this issue Feb 6, 2017 · 10 comments
Closed

Make possible to add a Bitmap to FreeDrawView #8

csbenz opened this issue Feb 6, 2017 · 10 comments
Assignees

Comments

@csbenz
Copy link

csbenz commented Feb 6, 2017

To be able to edit an old drawing.

@RiccardoMoro
Copy link
Owner

You mean restore a previous state from a FreeDrawView?

@csbenz
Copy link
Author

csbenz commented Feb 8, 2017 via email

@RiccardoMoro
Copy link
Owner

Mmm I was thinking, it would be easier if I just give you a method public Parcelable getViewState() which gives a Parcelable containing the FreeDrawView state and a public void restoreStateFromParcelable(Parcelable parcelable) which given the Parcelable restores the View state, would that be good for you? (for now, I'll be working on the bitmap thing with the https://github.com/RiccardoMoro/FreeDrawView/issues/5 issue)

@csbenz
Copy link
Author

csbenz commented Feb 9, 2017

That would be helpful, except for multi-platform apps. I'm saving the drawing in a cloud database and have to be able to recuperate it anywhere (eg PC). Still, I could store both the bitmap and the Parcelable State.

@RiccardoMoro
Copy link
Owner

Yes, you're right, I didn't think of multi-platform apps, my bad..
As a fast solution I can add the Parcelable save-restore today, and with time I'll add the option to restore from a Bitmap, would that be ok?

@csbenz
Copy link
Author

csbenz commented Feb 9, 2017 via email

@RiccardoMoro
Copy link
Owner

Slowly working on this... I'm very busy working lately sorry
I've made the method to get a Parcelable of the saved state, but than when I tried to write it inside a File I had an error doing myParcelable.marshall() because of the size of the Parcelable itself..
I'm trying something else in the next few days

@csbenz
Copy link
Author

csbenz commented Mar 7, 2017

Thanks for the update and for working on this issue.

@RiccardoMoro
Copy link
Owner

@csbenz (Finally) I'm about to release the save-restore functionality. (in v1.1.0, I'll push it on bintray in about an hour)
With the getCurrentViewStateAsSerializable() you can get the draw state as a Serializable
And with restoreStateFromSerializable(FreeDrawSerializableState state) you can restore it.

Let me know if you find any problem with this new functionality
Check out the new readme just above the View attributes section to see more

Thank you for the patience, Riccardo

@RiccardoMoro
Copy link
Owner

Closing this issue, let me know id you are having problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants