Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim result As String
result = ""
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ImageView1 As ImageView
Dim Button1 As Button
Dim label1 As View
Dim Canvas1 As Canvas
Dim Rect As Rect
Rect.Initialize(30, 30, 30 + 200, 30 + 65)
Canvas1.DrawDrawable(label1, Rect)
Activity.Invalidate
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("SaveImage.bal")
End Sub
Sub Activity_Resume
'Label1.Text = "" & Main.Input1
'Label2.Text = "" & Main.Input2
'Label3.Text = "" & Main.Input3
If Main.ImageDir<>"" Then
ImageView1.Bitmap = (LoadBitmapSample(Main.ImageDir, Main.Image1, 200, 200))
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Dim out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, "Snapshot.jpg", False)
Canvas1.Bitmap.WriteToStream(Out, 100, "JPEG")
Out.Close
End Sub