Sub Update
'
pnlUP.Initialize("pnlUP")
Dim bgnd As ColorDrawable
bgnd.Initialize(Colors.Black, 5dip)
pnlUP.Background = bgnd
Activity.addView(pnlUP, 25%x,40%y, 400dip, 155dip)
'
Dim lblUP As Label
lblUP.Initialize("lblUP")
lblUP.Text = "bitte warten, das Update wird heruntergeladen..."
pnlUP.AddView(lblUP, 20dip, 10dip, 360dip, 20dip)
'
prbUP.Initialize("prbUP")
pnlUP.addView(prbUP, 20dip,45dip, 360,40)
'
btnUP.Initialize("btnUP")
btnUP.Text = "Download abbrechen"
pnlUP.AddView(btnUP, 110dip, 105dip, 180dip, 40dip)
'
FTPu.DownloadFile("/html/LFupdate/LF.apk", False, ListDir, "LFapk.tmp")
'
End Sub
Sub FTPu_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
Dim s As String
s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
If Total > 0 Then
s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
'
prbUP.Progress = Round(TotalDownloaded / (Total/100) )
'
End If
End Sub