-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to set input type on android #2405
Added ability to set input type on android #2405
Conversation
@AndreMiras Rebased and just re-generated PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ready for the merge.
I've only asked a couple of questions for something I wasn't sure of if you could confirm
Handler commandHandler = new SDLCommandHandler(); | ||
|
||
// Send a message from the SDLMain thread | ||
- boolean sendCommand(int command, Object data) { | ||
+ protected boolean sendCommand(int command, Object data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh god it's so hard to read a diff of a diff, I initially tought you changed that.
You actually just removed some trailing whitespace so GitHub is showing the context which contains the previous diff, that's so confusing to read 🤯 but that's fine I'll manage
// This is what SDL runs in. It invokes SDL_main(), eventually | ||
protected static Thread mSDLThread; | ||
|
||
+ public static int keyboardInputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So at the end the changes you made to this SDLActivity.java.patch
file is only using this const and clearing some trailing whitespaces, correct or I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct.
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); | ||
imm.restartInput(mTextEdit); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK nice, then someone could write the Python wrapper in pythonforandroid/recipes/android/src/android/
later, correct?
If you already have done so for your project you could share the code snipped in some comments. Or better make a follow up PR after this one is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it could be.
This change keyboard function is being utilized kivy/kivy#7231
Merged, thanks for getting back to me on my questions |
This PR added ability to set input type for keyboard on android. It needs to be merged with kivy/kivy#7231
this is just a new PR with a successful rebase so the CI builds.
closes #2361