Sub Show_Selection
If pnlContainer.IsInitialized Then
If pnlContainer.Visible Then
Return
End If
End If
others.AddToLog("Selecting linie")
pnlContainer.Initialize("pnl")
Log("1") 'this helps in Release mode, why ?
pnlContainer.Visible = False
Log("2") 'this helps in Release mode, why ?
Activity.AddView(pnlContainer, 0, 0, 100%x, 100%y)
Log("3") 'this helps in Release mode, why ?
pnlContainer.Color = Colors.ARGB(220, 30, 30, 30)
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "Linie / Fahrtnummer eingeben"
lbl.TextColor = Colors.White
lbl.Gravity = Gravity.CENTER_HORIZONTAL
txt.Initialize("txt")
txt.SingleLine = True
#if ver8
txt.InputType = txt.INPUT_TYPE_NONE 'INPUT_TYPE_TEXT
IME.SetCustomFilter(txt, txt.INPUT_TYPE_NONE, "0123456789/")
txt.Hint = "z.B. 7/68"
#else if ver7
txt.InputType = txt.INPUT_TYPE_NUMBERS
IME.SetCustomFilter(txt, txt.INPUT_TYPE_NONE, "0123456789")
txt.Hint = "z.B. 768"
#end if
txt.Wrap = False
txt.Gravity = Gravity.TOP
txt.HintColor = 0xFF4A494A
txt.Color = 0xFF656365
Dim pnlKeyboard As Panel
pnlKeyboard.Initialize("")
pnlContainer.AddView(lbl, 0, 5%y, 100%x, 9%y)
pnlContainer.AddView(txt, 0, lbl.Top + lbl.Height + 5dip, 100%x, 17%y)
pnlContainer.AddView(pnlKeyboard, 0, txt.Top + txt.Height * 2, 100%x, 64%y)
pnlKeyboard.Height = 100%y - pnlKeyboard.Top
pnlKeyboard.LoadLayout("kbd")
Dim Padding As Int = 10dip
Dim H As Int = (100%y - pnlKeyboard.Top - Padding * 5) / 4
but1.Height = H
but2.Height = H
but3.Height = H
but4.Height = H
but5.Height = H
but6.Height = H
but7.Height = H
but8.Height = H
but9.Height = H
but0.Height = H
butDel.Height = H
butSlash.Height = H
butOK.Height = H
but1.Width = H * 2.13
but2.Width = but1.Width
but3.Width = but1.Width
but4.Width = but1.Width
but5.Width = but1.Width
but6.Width = but1.Width
but7.Width = but1.Width
but8.Width = but1.Width
but9.Width = but1.Width
but0.Width = but1.Width
butDel.Width = but1.Width
butOK.Width = but1.Width
butSlash.Width = but1.Width
but2.Left = but1.Left + but1.Width + Padding
but3.Left = but2.Left + but2.Width + Padding
but5.Left = but4.Left + but4.Width + Padding
but6.Left = but5.Left + but5.Width + Padding
but8.Left = but7.Left + but7.Width + Padding
but9.Left = but8.Left + but8.Width + Padding
but0.Left = butSlash.Left + butSlash.Width + Padding
butDel.Left = but0.Left + but0.Width + Padding
butOK.Left = butDel.Left + butDel.Width + Padding
but4.Top = but1.Top + but1.Height + Padding
but5.Top = but1.Top + but1.Height + Padding
but6.Top = but1.Top + but1.Height + Padding
but7.Top = but4.Top + but4.Height + Padding
but8.Top = but4.Top + but4.Height + Padding
but9.Top = but4.Top + but4.Height + Padding
but0.Top = but7.Top + but7.Height + Padding
butDel.Top = but7.Top + but7.Height + Padding
butOK.Top = butDel.Top
butSlash.Top = but7.Top + but7.Height + Padding
but1.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-1.png"))
but2.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-2.png"))
but3.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-3.png"))
but4.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-4.png"))
but5.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-5.png"))
but6.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-6.png"))
but7.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-7.png"))
but8.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-8.png"))
but9.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-9.png"))
but0.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste-0.png"))
butDel.SetBackgroundImage(LoadBitmap(File.DirAssets, "del.png"))
butSlash.SetBackgroundImage(LoadBitmap(File.DirAssets, "slash.png"))
butOK.SetBackgroundImage(LoadBitmap(File.DirAssets, "Taste_OK.png"))
#if ver8
butSlash.Visible = True
pnlKeyboard.Width = butOK.Left + butOK.Width + 10dip
#else if ver7
butOK.Left = but1.Left
pnlKeyboard.Width = butDel.Left + butDel.Width + 10dip
butSlash.Visible = False
#end if
pnlKeyboard.Left = (100%x - pnlKeyboard.Width)/2
lbl.TextSize = 30
txt.TextSize = 48
pnlContainer.Visible = True
txt.RequestFocus
End Sub