Sub ShowWeather()
Dim currentY As Int = 0
'lblHdr1.Text = wt.GetValue("main")
WetterLabel.Text = wt.GetValue("main")
'lblHdr2.Text = wt.GetValue("temp") & wt.GetUnit("temp")
wt.LoadCurrentIcon(imgWeather)
wt.LoadCurrentIcon(WettersymbolImageView)
TempAussenLabel.Text = wt.GetValue("temp") & wt.GetUnit("temp")
Dim lbl As Label
lbl.Initialize("")
lbl.TextSize = 12
Dim s As String = wt.GetValue(lstDetails.Get(0))
s = s.SubString2(0, 1).ToUpperCase & s.SubString(1)
lbl.Text = s
WetterPanel.AddView(lbl, 1dip, currentY, 100%x, 140dip)
currentY = currentY + 15dip
Dim theKey As String
For i = 1 To lstDetails.Size-1
theKey = lstDetails.Get(i)
If wt.GetValue(theKey) <> "" Then
Dim lbl As Label
lbl.Initialize("")
lbl.Visible=False ' Unsichtbar machen
lbl.TextSize = 10
lbl.Text = wt.GetCaption(theKey) & ": " & wt.GetValue(theKey) & wt.GetUnit(theKey)
If theKey = "wind_speed" Then
lbl.Text = lbl.Text & " (" & NumberFormat2(wt.GetValue(theKey) * 3.6, 1, 2, 1, False) & " km/h)"
WindSpeedLabel.Text = NumberFormat2(wt.GetValue(theKey) * 3.6, 1, 2, 1, False)
End If
If theKey = "wind_degrees" Then
lbl.Text = lbl.Text & " (" & wt.GetValue("cardinal") & ")"
WindrichtungLabel.Text = wt.GetValue("cardinal")
End If
If theKey = "pressure" Then
LuftdruckLabel.Text = wt.GetValue("pressure")
End If
If theKey = "humidity" Then
HumAussenLabel.Text = wt.GetValue("humidity")
End If
WetterPanel.AddView(lbl, 1dip, currentY, 100%x, 140dip)
currentY = currentY + 15dip
End If
Next
End Sub