'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim GetImage As Button
Dim ImageView1 As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
cc.Initialize ("chooser")
ImageView1.Initialize ("")
GetImage.Initialize ("GetImage")
ImageView1.Gravity = Gravity.Fill
Activity.AddView (ImageView1, 10dip, 100dip, 300dip, 300dip)
GetImage.Text = "Load Picture"
Activity.AddView (GetImage,10dip, 10dip, 300dip, 60dip)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub GetImage_Click
CC.Show("image/*", "Choose image")
End Sub
Sub chooser_Result (Success As Boolean, Dir As String, FileName As String)
If Success Then ImageView1.Bitmap = LoadBitmap (Dir, FileName)
End Sub