I have an edit text that has been set to always hide the keyboard with Java code:
B4X:
Sub Globals()
Private NativeMe As JavaObject
End Sub
#IF JAVA
import android.widget.EditText;
import android.os.Build;
import android.text.InputType;
public void disableSoftKeyboard(final EditText v) {
if (Build.VERSION.SDK_INT >= 11) {
v.setRawInputType(InputType.TYPE_CLASS_TEXT);
v.setTextIsSelectable(true);
v.setShowSoftInputOnFocus(false);
} else {
v.setRawInputType(InputType.TYPE_NULL);
v.setFocusable(true);
}
}
public void enableSoftKeyboard(final EditText v) {
if (Build.VERSION.SDK_INT >= 11) {
v.setRawInputType(InputType.TYPE_CLASS_TEXT);
v.setTextIsSelectable(true);
v.setShowSoftInputOnFocus(true);
} else {
v.setRawInputType(InputType.TYPE_CLASS_TEXT);
v.setFocusable(true);
}
}
#END IF
Sub SetEditTextInput_Type(bDefaultKeyboard As Boolean, oEditText As EditText)
If NativeMe.IsInitialized = False Then
NativeMe.InitializeContext
End If
If bDefaultKeyboard Then
NativeMe.RunMethod("enableSoftKeyboard", Array As Object(oEditText))
oEditText.InputType = 131217 'no suggestions
Else
NativeMe.RunMethod("disableSoftKeyboard", Array As Object(oEditText))
End If
End Sub
[CODE]
This all works fine, but I would like to avoid the Paste Clipboard menu to popup.
Any idea how this could be done?
RBS