Skip to content

Instantly share code, notes, and snippets.

@mohamedagamy
Created September 12, 2019 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohamedagamy/dc08636884758875d8ba9c484e34b98b to your computer and use it in GitHub Desktop.
Save mohamedagamy/dc08636884758875d8ba9c484e34b98b to your computer and use it in GitHub Desktop.
prevent keyboard disappear
//The goal is to make a custom lock screen that the user must enter a pass code
//or leave the application.
//When the user taps the "keyboard down" button the keyboard does not disappear.
//https://stackoverflow.com/questions/13591012/implementing-onkeypreimeint-keycode-keyevent-event-in-fragment
public class CustomKonashaEditText extends AppCompatEditText {
public CustomKonashaEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment