Android Question How to show the keyboard for a DSFloatLabelEditText? (IME not working)


Active Member
Licensed User
I have 2 DSFloatLabelEditText of the design support library. For filling the first one I have a buton to use a BarcodeScaner with some code like this:

Sub BarcodeOk(Value As String)
    DSFloat1.Text = Value
End Sub

Sub DSFloat2_FocusChanged (HasFocus As Boolean)
    If HasFocus = True Then
        ToastMessageShow("Has the focus", True)
    End If
End Sub

The toast is shown, The DSFloat2 got the focus (prompt is there) but the keyboard does not show until i tap on DSFloat2 view.

I already tried: CallSubDelayed the ime, Sleep before the ime, same both changing the ime call to BarcodeOk.

Maybe is because DSFloatLabelEditText is not a valid View for IME.

Any idea on how to set focus and show the keyboard on a DSFloatLabelEditText?

(Or if has a inner EditText, how to get it to call the ime with it)
Last edited:


Active Member
Licensed User
Yeap, cant pass the wraper to the IME. Have to Extract the inner View object. Calling this in FocusChanged

Sub ShowKeyboard
        Dim r As Reflector
        r.Target = TxtClave
        r.Target = r.GetField("mEditText")
        Dim jo As JavaObject = r.GetField("object")

        Dim nativeMe As JavaObject
        nativeMe.RunMethod("showSoftKeyboard",Array As Object(jo))
        Log("No Keyboard")
    End Try
End Sub
#If Java

public void showSoftKeyboard(android.view.View view){
        android.view.inputmethod.InputMethodManager imm = (android.view.inputmethod.InputMethodManager) getSystemService(android.content.Context.INPUT_METHOD_SERVICE);
        imm.showSoftInput(view, 0);
#End If