Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim cc As ContentChooser
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 ImageViewTemp As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("image1.bal")
cc.Initialize ("chooser")
ImageView1.Initialize ("ImageView1")
ImageView1.Gravity = Gravity.Fill
Activity.AddView (ImageView1, 165, 210, 150, 150)
End Sub
Sub chooser_Result (Success As Boolean, Dir As String, FileName As String)
If Success Then ImageViewTemp.Bitmap = (LoadBitmapSample (Dir, FileName, 150, 150))
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ImageView1_Click
cc.Show("image/*", "Choose image")
ImageViewTemp = ImageView1
End Sub