Created
September 12, 2019 09:04
-
-
Save mohamedagamy/dc08636884758875d8ba9c484e34b98b to your computer and use it in GitHub Desktop.
prevent keyboard disappear
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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