Android Question Two Editext boxes behaving differently

saunwin

Active Member
Licensed User
Longtime User
I have two panels, each panel contains a label and an edit text box.

The first piece of code (inside a sub), shows the keyboard and a flashing cursor in the edit text box - perfect.

mnuCust_Click doesn't display the keyboard until i touch the edittext box, then a blue arrow pops up (cursor). This happens even if I make editText2="".

Any ideas ?
TIA


B4X:
        If highest > current Then
            HSpanel.Visible=True
            EditText1.SingleLine=True
            EditText1.Text=""
            EditText1.InputType=EditText1.INPUT_TYPE_TEXT
            EditText1.RequestFocus
            ime.ShowKeyboard(EditText1)
            MediaPlayer1.Play
        Else
            ToastMessageShow("Sorry - You didn't make the leader board", False)
            MediaPlayerlongbeep.Play
        End If


B4X:
Sub mnuCust_Click
    'Custom message input
    Panel1.Visible=True
    EditText2.SingleLine=True
    EditText2.Text=Userlbl.Text
    EditText2.InputType=EditText2.INPUT_TYPE_TEXT
    EditText2.RequestFocus
    ime.ShowKeyboard(EditText2)
End Sub
 

saunwin

Active Member
Licensed User
Longtime User
Hi All,
I got the boxes looking the same (some code changing things) but the keyboard appears with
ime.ShowKeyboard(EditText1), but doesn't appear with
ime.ShowKeyboard(EditText2)
Weird ?
any ideas
TIA
 
Upvote 0

saunwin

Active Member
Licensed User
Longtime User
FIXED
Before
ime.ShowKeyboard(EditText2)
I put the line DoEvents before the showkeyboard line.
explaination HERE.

Thanks once again to Erel
 
Upvote 0
Top