Coder Social home page Coder Social logo

Comments (10)

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024 1

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

from freedrawview.

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024

You mean restore a previous state from a FreeDrawView?

from freedrawview.

csbenz avatar csbenz commented on May 21, 2024

from freedrawview.

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024

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)

from freedrawview.

csbenz avatar csbenz commented on May 21, 2024

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.

from freedrawview.

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024

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?

from freedrawview.

csbenz avatar csbenz commented on May 21, 2024

from freedrawview.

csbenz avatar csbenz commented on May 21, 2024

Thanks for the update and for working on this issue.

from freedrawview.

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024

@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

from freedrawview.

RiccardoMoro avatar RiccardoMoro commented on May 21, 2024

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

from freedrawview.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.