Hi
I'm having trouble trying to display a plain non animated .gif in an imageView place holder with the code below. The file exists and the filename checks out good. All I get is a blank white square on the display where the image should be.
Can anyone let me know where I'm going wrong?
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim label7, label8, label9, label10, label11 As Label
Dim IVmoon As ImageView
Dim bitmapImage As Bitmap
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("moonDisplayLayout")
label10.Text = Main.moonReturnedLabels.label1 '% illuminated
label7.Text = Main.moonReturnedLabels.label2 'moon Age
label11.Text = Main.moonReturnedLabels.label3 'phase name
label8.Text = Main.moonReturnedLabels.label4 'moon rise
label9.Text = Main.moonReturnedLabels.label5 'moon set
Dim moonAge As Int, moonFilename As String
moonAge = s.Val(s.Left(Main.moonReturnedLabels.label2,2))
IVmoon.Initialize("")
moonFilename = "moon" & moonAge & ".gif"
bitmapImage.Initialize(File.DirAssets,moonFilename)
IVmoon.Bitmap = bitmapImage
End Sub
a typical filename should be 'moon17.gif'
Thanks,
Azhar
I'm having trouble trying to display a plain non animated .gif in an imageView place holder with the code below. The file exists and the filename checks out good. All I get is a blank white square on the display where the image should be.
Can anyone let me know where I'm going wrong?
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim label7, label8, label9, label10, label11 As Label
Dim IVmoon As ImageView
Dim bitmapImage As Bitmap
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("moonDisplayLayout")
label10.Text = Main.moonReturnedLabels.label1 '% illuminated
label7.Text = Main.moonReturnedLabels.label2 'moon Age
label11.Text = Main.moonReturnedLabels.label3 'phase name
label8.Text = Main.moonReturnedLabels.label4 'moon rise
label9.Text = Main.moonReturnedLabels.label5 'moon set
Dim moonAge As Int, moonFilename As String
moonAge = s.Val(s.Left(Main.moonReturnedLabels.label2,2))
IVmoon.Initialize("")
moonFilename = "moon" & moonAge & ".gif"
bitmapImage.Initialize(File.DirAssets,moonFilename)
IVmoon.Bitmap = bitmapImage
End Sub
a typical filename should be 'moon17.gif'
Thanks,
Azhar