Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ScaleImageView1 As ScaleImageView
Private Canvas As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Viewer")
gestures.SetOnGestureListener(Panel1, "Panel1")
Canvas.Initialize(ScaleImageView1)
End Sub
Sub ScaleImageView1_OnDraw(viewcanvas As Canvas) 'The view is being redrawn. Use viewcanvas to draw on it.
canvas=viewcanvas
Log("draw")
End Sub
Private Sub Button_save_Click
Dim Out As OutputStream
Out = File.OpenOutput( File.DirRootExternal & "/Download/", "Testxv.jpg", False)
canvas.bitmap.WriteToStream(Out, 90, "JPEG")
Out.Close
End Sub