Hello All,
Android Version 2.3.4
I want to have certain but not all EditText views to have a custom keypad.
My construnction is
You can see that I am using IME to define the active buttons for the KeyPad
Note: I know that integers do not have decimals so the code is supplied for ease of digestion
My Focus Event code is
From the FocusChanged event, the keyboard is made visible by the IME call.
However I only get as basic numeric keypad with ".,-" buttons disabled.
Please can someone tell me where I am going wrong?
Regards and Thanks
SeaCay
Android Version 2.3.4
I want to have certain but not all EditText views to have a custom keypad.
My construnction is
B4X:
Sub makeEdit(Id As Int)
Dim edtHeight As Int
Dim eIME As IME
Dim anEdit As EditText
edtHeight = 60
make_Quest_Label(Id)
FBEdits(edtKount).Initialize("Edit")
anEdit = FBEdits(edtKount)
checkPanelHeight(edtHeight) 'Checks/Adjusts to ensure that parent will display the view fully
FBPanels(pnlKount - 1).AddView(FBEdits(edtKount), EditX, LastY, TEXTWIDTH, edtHeight)
FBEdits(edtKount).Tag = Id
FBEdits(edtKount).Text = "0"
If (FldType(Id) = "FLOAT") OR (FldType(Id) = "INTEGER") Then
eIME.SetCustomFilter(anEdit, anEdit.INPUT_TYPE_NUMBERS, "0123456789.,-")
End If
FBEdits(edtKount).TextColor = Colors.RGB(128, 128, 0)
LastY = FBEdits(edtKount).Top + FBEdits(edtKount).Height + FreeHeight
edtKount = edtKount + 1
End Sub
Note: I know that integers do not have decimals so the code is supplied for ease of digestion
My Focus Event code is
B4X:
Sub Edit_FocusChanged (HasFocus As Boolean)
Dim anEdit As EditText
Dim FBIME As IME
anEdit = Sender
If (HasFocus = True) Then
FBIME.ShowKeyboard(anEdit)
Else
FBIME.HideKeyboard
End If
End Sub
From the FocusChanged event, the keyboard is made visible by the IME call.
However I only get as basic numeric keypad with ".,-" buttons disabled.
Please can someone tell me where I am going wrong?
Regards and Thanks
SeaCay