Android Question Keyboard not shows

h4an

Member
Licensed User
Longtime User
B4A Ver. 12.50, Android ver. 8.1.0

I have a MaskedEditText on a panel together with a button.

I try to use this code to show the panel and want also the keyboard shows automatically. If I click in the MaskedEditText the keyboard appears.

Code: Copy
txtChange.Text = DateTime.Time(rs.GetLong("Starttime"))
txtChange.SelectAll
IME.ShowKeyboard(txtChange)
pnlChange.Visible = True
 
Solution
Try to move pnlChange.Visible = True to the front of IME.ShowKeyboard(txtChange)
Now I have a solution how I can work around this. If I place IME.ShowKeyboard(txtChange) and IME.HideKeyboard first in the B4XTable_CellLongClicked (ColumnId As String, RowId As Long) and then a new IME.ShowKeyboard(txtChange) in the If Result = xui.DialogResponse_Positive part then it works. Thank you for your time.
Which panel is the MaskedEditText on? and which sub your code is in?
Try to add sleep(0) before IME.ShowKeyboard(txtChange).
 
Upvote 0
Which panel is the MaskedEditText on? and which sub your code is in?
Try to add sleep(0) before IME.ShowKeyboard(txtChange).
The MaskedEditText is on panel pnlChange, the code is in B4XTable_CellLongClicked (ColumnId As String, RowId As Long) after a xui.Msgbox2Async question on xui.DialogResponse_Positive response. Sleep(0) did not help.
 
Upvote 0
Try to move pnlChange.Visible = True to the front of IME.ShowKeyboard(txtChange)
 
Upvote 0
Try to move pnlChange.Visible = True to the front of IME.ShowKeyboard(txtChange)
I have make some investigations, if a move the code somewhere before Wait For (sf) Msgbox_Result (Result As Int) then it works. But I want it in the If Result = xui.DialogResponse_Positive.
 
Upvote 0
Try to move pnlChange.Visible = True to the front of IME.ShowKeyboard(txtChange)
Now I have a solution how I can work around this. If I place IME.ShowKeyboard(txtChange) and IME.HideKeyboard first in the B4XTable_CellLongClicked (ColumnId As String, RowId As Long) and then a new IME.ShowKeyboard(txtChange) in the If Result = xui.DialogResponse_Positive part then it works. Thank you for your time.
 
Upvote 0
Solution
Back
Top