2

Need some help to enable multiple lines in EditText WITHOUT permiting softkeyboard to open.

I DON'T use android's native softkeyboard. I have my own "softkeyboard" as a view inside activity.

I've tried these solutions, but they DID NOT WORK:

Community
  • 1
  • 1
Christian
  • 7,062
  • 9
  • 53
  • 79

1 Answers1

0

This solution works fine for Android 2 but doesn't work for SOME Android 4 phones (And I don't really know why):

<EditTextExtension
a:editable="false"
a:singleLine="false"/>

Class EdiTextExtension should override onCheckIsTextEditor() method:

@Override
public boolean onCheckIsTextEditor() {
    if ( Build.VERSION.SDK_INT >= 11 ) {
        // resulting false for Android >= 11 will hide cursor
        // NOTE: this code works fine only with SOME devices and not all (WHY?)
        return true;
    } else {
        return false;
    }
}
se.solovyev
  • 1,901
  • 1
  • 16
  • 20