android-signaturepad
android-signaturepad copied to clipboard
Study a way of managing size changes
What to do when the view size changes? The signature should be cropped or shrinked?
IMHO, just scaling it should be the propper behaviour. I will never crop it.
Scaling to fit would be my preference too, or otherwise allow programmer to set own preference.
Working right now on a way of restoring the signature on activity restart and on orientation change (in my project, not the library). In my case the size of the SignaturePad would change depending on orientation.
Have been trying to use getSignatureSvg() to get the signature as SVG and then later parsing and painting it as a bitmap using BigBadaboom/androidsvg library. It seems to work fine (let me know if you want I can share the code with you) aside from a couple of issues: one where it needs to set a viewbox and new document size on the SVG to be able to scale it and second where subsequent getSignatureSvg() after the setSignatureBitmap() would return an empty SVG root with just the size and no contents.
library should manage this automatically, scale image would be the easier way
Scaling to fit would be my preference too, or otherwise allow programmer to set own preference.
Working right now on a way of restoring the signature on activity restart and on orientation change (in my project, not the library). In my case the size of the SignaturePad would change depending on orientation.
Have been trying to use getSignatureSvg() to get the signature as SVG and then later parsing and painting it as a bitmap using BigBadaboom/androidsvg library. It seems to work fine (let me know if you want I can share the code with you) aside from a couple of issues: one where it needs to set a viewbox and new document size on the SVG to be able to scale it and second where subsequent getSignatureSvg() after the setSignatureBitmap() would return an empty SVG root with just the size and no contents.
My signature bitmap getting changed on orientation change. Struggling to resolve the issue from few days. Can you please share the code of this.