Last active
December 14, 2019 00:49
-
-
Save suzp1984/d16d1e6933cbbfb957d6bfb38b6cfaab to your computer and use it in GitHub Desktop.
wire up the unfocusable EditText with CustomInputView & InputDelegateView
This file contains 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
// editText -> unfocusable EditText | |
// customeKeyboardView -> simulated keyboard | |
// inputDelegateView -> Delegate system keyboard input to EditText | |
func wireUpConnections() { | |
val inputConnection = editText.onCreateInputConnection(EditorInfo()) | |
customeKeyboardView.inputConnection = inputConnection | |
val keyboardInputConnection = editText.onCreateInputConnection(EditorInfo()) | |
inputDelegateView.delegateConnection = keyboardInputConnection | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment