Sub Build_GUI2
'Prepare gradient
cols1(0) = Colors.ARGB(255,167,221,241)
cols1(1) = Colors.White
gd1.Initialize( "BOTTOM_TOP",cols1)
gd2.Initialize( "TOP_BOTTOM",cols1)
gd1.CornerRadius=0
gd2.CornerRadius=0
Activity.Background=gd2
Dim Labellist As List
Labellist.Initialize
Labellist.Add("Auto:")
Labellist.Add("Autocolor:")
Labellist.Add("Kennzeichen:")
Labellist.Add("Mitgliedsnummer:")
Labellist.Add("Name:")
Labellist.Add("Handynummer:")
Labellist.Add("VW Passat")
Labellist.Add("Hell Blau")
Labellist.Add("QB 145BG")
Labellist.Add("123456789")
Labellist.Add("John Doe")
Labellist.Add("06215589589")
For i=0 To 5
Dim lbl As Label
Dim edttxt As EditText
edttxt.Initialize("edttxt_Edit") 'All edittexts use the same sub, tag determines value
lbl.Initialize("")
'Add label
Activity.AddView(lbl, 15dip, i*100dip+10dip, Activity.Width/2, 40dip)
lbl.Background=gd1
lbl.Text=Labellist.Get(i)
lbl.TextColor=Colors.Black
'Add Edittext
Activity.AddView(edttxt, 25dip, i*100dip+50dip, Activity.Width/2, 40dip)
edttxt.Background=gd1
edttxt.Tag=Labellist.Get(i)
If SetDummyValues Then
edttxt.Text=Labellist.Get(i+6)
End If
Next
'Buttons
Dim bmd As BitmapDrawable
bmd.Initialize(LoadBitmap(File.DirAssets, "close.png"))
btnBack.Initialize("btnBack")
btnBack.Background = bmd
Activity.AddView(btnBack, 100%x-50dip, 100%y-50dip, 48dip,48dip)
End Sub