#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalRes: ..\fdres
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim time As Timer
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 fd As FreshDownloadView
Dim progress As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
time.Initialize("time",2000)
time.Enabled=True
fd.Initialize("fd")
Activity.AddView(fd,0,0,200dip,200dip)
fd.startDownload
End Sub
Sub time_tick
If progress<1 Then
progress=progress+0.1
fd.upDateProgress(progress)
End If
End Sub
Sub fd_click
fd.showDownloadError
End Sub