Comments (10)
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.
You mean restore a previous state from a FreeDrawView?
from freedrawview.
from freedrawview.
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.
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.
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.
from freedrawview.
Thanks for the update and for working on this issue.
from freedrawview.
@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.
Closing this issue, let me know id you are having problems
from freedrawview.
Related Issues (16)
- getCurrentViewStateAsSerializable() returns soft copy (dynamic mutable state) HOT 1
- getting mSignatureView.getDrawingCache() as null
- Is it possible to record the path points of line?
- Is it possible to have a transparent background? HOT 1
- Detect User stopped drawing HOT 8
- Add possibility to restore Bitmap from a file. HOT 3
- Idea for draw mode HOT 1
- Set bitmap as background in DrawView HOT 1
- Upgrade target sdk and support library versions to API 28
- width and height must be > 0
- Set a BitmapShader to the Paint
- Possible enchancement HOT 1
- Support eraser? HOT 8
- Error if setOnPathDrawnListener() is not called HOT 3
- Listeners Not Working ! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freedrawview.