Sep 4, 2016 Replies: 12 A wrapper for this project https://github.com/mukeshsolanki/DrawingView-Android DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images. sample: Code: Copy Dim demo As DrawingView Code: Copy demo.Initialize("") Activity.AddView(demo,0,0,100%x,80%y) demo.DrawBackgroundColor=Colors.White NOTE: Code: Copy DependsOn(values={"android-support-v4"}) When saving image use format fields like COMPRESS_PNG . Version 2 adds loadimage(bitmap as bitmap) method so you can load your previous drawing as asked by @Almora DrawingView Author: SMM Version: 0.01 DrawingView Fields: COMPRESS_JPEG As CompressFormat COMPRESS_PNG As CompressFormat ba As BA Methods: BringToFront Initialize (EventName As String) Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) initializeEraser initializePen saveImage (filePath As String, filename As String, format As CompressFormat, quality As Int) Properties: Background As Drawable Color As Int [write only] DrawBackgroundColor As Int [write only] Enabled As Boolean EraserSize As Float [write only] Height As Int Left As Int Parent As Object [read only] PenColor As Int [write only] PenSize As Float [write only] Tag As Object Top As Int Visible As Boolean Width As Int Attachments DrawingView.zip DrawingView.zip 7.3 KB · Views: 765 DrawingView2.zip DrawingView2.zip 7.5 KB · Views: 718 Last edited: Jan 3, 2017 Click to expand...
A wrapper for this project https://github.com/mukeshsolanki/DrawingView-Android DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images. sample: Code: Copy Dim demo As DrawingView Code: Copy demo.Initialize("") Activity.AddView(demo,0,0,100%x,80%y) demo.DrawBackgroundColor=Colors.White NOTE: Code: Copy DependsOn(values={"android-support-v4"}) When saving image use format fields like COMPRESS_PNG . Version 2 adds loadimage(bitmap as bitmap) method so you can load your previous drawing as asked by @Almora DrawingView Author: SMM Version: 0.01 DrawingView Fields: COMPRESS_JPEG As CompressFormat COMPRESS_PNG As CompressFormat ba As BA Methods: BringToFront Initialize (EventName As String) Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) initializeEraser initializePen saveImage (filePath As String, filename As String, format As CompressFormat, quality As Int) Properties: Background As Drawable Color As Int [write only] DrawBackgroundColor As Int [write only] Enabled As Boolean EraserSize As Float [write only] Height As Int Left As Int Parent As Object [read only] PenColor As Int [write only] PenSize As Float [write only] Tag As Object Top As Int Visible As Boolean Width As Int
somed3v3loper Well-Known Member Licensed User Longtime User Sep 25, 2016 #4 Edgardo PuntoCom said: Do I need B4A 6 for use this? Click to expand... I don't think so . Can you test on your current version and feedback ?
Edgardo PuntoCom said: Do I need B4A 6 for use this? Click to expand... I don't think so . Can you test on your current version and feedback ?
E Edgardo PuntoCom Member Licensed User Longtime User Sep 25, 2016 #5 somed3v3loper said: I don't think so . Can you test on your current version and feedback ? Click to expand... When making a new application works well in B4A 5.8. When attempting to integrate into an application that I have made, compiling never ends. A shame. Maybe in the future I find how to make it work. Either way this library is great. Thanks for sharing.
somed3v3loper said: I don't think so . Can you test on your current version and feedback ? Click to expand... When making a new application works well in B4A 5.8. When attempting to integrate into an application that I have made, compiling never ends. A shame. Maybe in the future I find how to make it work. Either way this library is great. Thanks for sharing.
E Edgardo PuntoCom Member Licensed User Longtime User Oct 23, 2016 #6 How to use saveImage? Code: Copy Dim dv1 As DrawingView panelMiArte.AddView(dv1,0,50dip,100%x -10dip,100%x -10dip) dv1.DrawBackgroundColor=Colors.Transparent dv1.saveImage(File.DirRootExternal, "pictures/temporalSuperMEME002", dv1.COMPRESS_JPEG, 100) ??? Last edited: Oct 23, 2016
How to use saveImage? Code: Copy Dim dv1 As DrawingView panelMiArte.AddView(dv1,0,50dip,100%x -10dip,100%x -10dip) dv1.DrawBackgroundColor=Colors.Transparent dv1.saveImage(File.DirRootExternal, "pictures/temporalSuperMEME002", dv1.COMPRESS_JPEG, 100) ???
somed3v3loper Well-Known Member Licensed User Longtime User Oct 25, 2016 #7 Edgardo PuntoCom said: How to use saveImage? Code: Copy Dim dv1 As DrawingView panelMiArte.AddView(dv1,0,50dip,100%x -10dip,100%x -10dip) dv1.DrawBackgroundColor=Colors.Transparent dv1.saveImage(File.DirRootExternal, "pictures/temporalSuperMEME002", dv1.COMPRESS_JPEG, 100) ??? Click to expand... So sorry for late reply Code: Copy dv1.saveImage(File.DirRootExternal,"pictures/temporalSuperMEME002", dv1.COMPRESS_PNG, 100) this should work
Edgardo PuntoCom said: How to use saveImage? Code: Copy Dim dv1 As DrawingView panelMiArte.AddView(dv1,0,50dip,100%x -10dip,100%x -10dip) dv1.DrawBackgroundColor=Colors.Transparent dv1.saveImage(File.DirRootExternal, "pictures/temporalSuperMEME002", dv1.COMPRESS_JPEG, 100) ??? Click to expand... So sorry for late reply Code: Copy dv1.saveImage(File.DirRootExternal,"pictures/temporalSuperMEME002", dv1.COMPRESS_PNG, 100) this should work
Almora Well-Known Member Licensed User Longtime User Jan 3, 2017 #8 Hi... How do I get to the last screen that I draw after the application is opened?
somed3v3loper Well-Known Member Licensed User Longtime User Jan 3, 2017 #9 Almora said: Hi... How do I get to the last screen that I draw after the application is opened? Click to expand... Sorry but I did not get your question.
Almora said: Hi... How do I get to the last screen that I draw after the application is opened? Click to expand... Sorry but I did not get your question.
Almora Well-Known Member Licensed User Longtime User Jan 3, 2017 #10 I use translation. Do not look in the sack. I opened the application and made the drawing. I closed the application. How can I see the last drawing I draw on the screen when I turn it on again.
I use translation. Do not look in the sack. I opened the application and made the drawing. I closed the application. How can I see the last drawing I draw on the screen when I turn it on again.
somed3v3loper Well-Known Member Licensed User Longtime User Jan 3, 2017 #11 Almora said: I use translation. Do not look in the sack. I opened the application and made the drawing. I closed the application. How can I see the last drawing I draw on the screen when I turn it on again. Click to expand... I uploaded a new version to the first post that adds loadimage method . You can try it now .
Almora said: I use translation. Do not look in the sack. I opened the application and made the drawing. I closed the application. How can I see the last drawing I draw on the screen when I turn it on again. Click to expand... I uploaded a new version to the first post that adds loadimage method . You can try it now .
Almora Well-Known Member Licensed User Longtime User Jan 4, 2017 #13 Hello again .. pencil does not call old drawing call. how can I do it? because it is an image file cannot be reused. Attachments DrawingView.zip DrawingView.zip 7.9 KB · Views: 654 Last edited: Jan 7, 2017
Hello again .. pencil does not call old drawing call. how can I do it? because it is an image file cannot be reused.