Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Dim tf, tf1 As TextField
Dim tf2, tf3 As TextView
Dim gWidth As Int
Dim gPnl_Hide As Panel
Dim gIm_Hide As ImageView
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
gWidth = 100%x
gPnl_Hide.RemoveAllViews
AddViewsByCode
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
tf.Initialize("tf")
tf.Text = "text 1"
tf1.Initialize("tf")
tf1.Text = "text 2"
tf2.Initialize("tf")
tf2.KeyboardType = tf2.TYPE_NUMBER_PAD
tf2.Text = "text 3"
tf3.Initialize("tf")
tf3.Text = "text 4"
gIm_Hide.Initialize("Im_Hide")
gIm_Hide.Bitmap = LoadBitmap(File.DirAssets, "hide_keyboard.png")
gIm_Hide.Height = 50
gIm_Hide.Width = 40
gPnl_Hide.Initialize ("")
gPnl_Hide.Color = Colors.Transparent
gPnl_Hide.Height = 40
' Page1.RootPanel.AddView ( gIm_Hide, 230,0,50,50)
End Sub
Sub Im_Hide_Click
Page1.ResignFocus
End Sub
Sub AddViewToKeyboard (TextField1 As Object)
Dim no As NativeObject = TextField1
no.SetField("inputAccessoryView", gPnl_Hide)
End Sub
Sub AddViewsByCode
Page1.RootPanel.AddView(tf, 0, 0, 200, 50)
Page1.RootPanel.AddView(tf1, 0, 50, 200, 50)
Page1.RootPanel.AddView(tf2, 0, 100, 200, 50)
Page1.RootPanel.AddView(tf3, 0, 150, 200, 50)
gPnl_Hide.AddView ( gIm_Hide, gWidth-55,0,50,40)
AddViewToKeyboard(tf )
AddViewToKeyboard(tf1 )
AddViewToKeyboard(tf2 )
AddViewToKeyboard(tf3 )
End Sub