Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
lblFlag.Color=Colors.DarkGray
MyList.Initialize
MyList2.Initialize
MyList=File.ListFiles(File.DirAssets)
For Each f As String In MyList
If f.EndsWith(".png") Then
MyList2.Add(f)
End If
Next
ImageSlider1.WindowBase.Color=Colors.Cyan
ImageSlider1.NumberOfImages = MyList2.Size
If FirstTime Then
timer1.Initialize("timer1", 2500)
End If
ImageSlider1.PrevImage
End Sub
Sub ImageSlider1_GetImage (Index As Int) As ResumableSub
Idx=Index
Return xui.LoadBitmapResize(File.DirAssets,MyList2.Get(Index), _
ImageSlider1.WindowBase.Width/2, ImageSlider1.WindowBase.Height, True)
End Sub
Sub btnNext_Click
ImageSlider1.NextImage
lblFlag.Text=MyList2.Get(Idx) & " " & Idx
End Sub
Sub btnPrev_Click
ImageSlider1.PrevImage
lblFlag.Text=MyList2.Get(Idx) & " " & Idx
End Sub
Sub btnPlay_Click
timer1.Enabled = Not(timer1.Enabled)
If timer1.Enabled Then btnPlay.Text = Chr(0xF04D) Else btnPlay.Text = Chr(0xF04B)
End Sub
Sub Timer1_Tick
btnNext_Click
End Sub