This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Avoid showing Zh-TW and Zh-CN keyboard candidate view when typing symbols.#3507
Merged
Avoid showing Zh-TW and Zh-CN keyboard candidate view when typing symbols.#3507
Conversation
keianhzo
suggested changes
Jun 18, 2020
Contributor
keianhzo
left a comment
There was a problem hiding this comment.
@daoshengmu This PR makes the Zh-CN and Zh-TW differ in the way they show candidates for symbols. Pinyin shows the candidate view for symbols and Zhuyin doesn't. For what I see in the GBoard for both Pinyin and Zhuyin showing the symbols keyboard hides the candidate view automatically, maybe we should unify that also in our Chinese keyboards? Japanese on the other side composes and keeps the candidate view opened when adding symbols.
Also I'm getting a crash in the Zhuyin keyboard when typing characters and adding a symbol after that:
java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
at org.mozilla.vrbrowser.ui.widgets.KeyboardWidget.updateCandidates(KeyboardWidget.java:4)
at org.mozilla.vrbrowser.ui.widgets.KeyboardWidget.handleText(KeyboardWidget.java:20)
at org.mozilla.vrbrowser.ui.widgets.KeyboardWidget.onKey(KeyboardWidget.java:34)
at org.mozilla.vrbrowser.ui.views.CustomKeyboardView.detectAndSendKey(CustomKeyboardView.java:20)
at org.mozilla.vrbrowser.ui.views.CustomKeyboardView.onModifiedTouchEvent(CustomKeyboardView.java:61)
at org.mozilla.vrbrowser.ui.views.CustomKeyboardView.onTouchEvent(CustomKeyboardView.java:15)
at android.view.View.dispatchTouchEvent(View.java:13415)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3060)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2755)
at org.mozilla.vrbrowser.ui.widgets.UIWidget.handleTouchEvent(UIWidget.java:1)
at org.mozilla.vrbrowser.input.MotionEventGenerator.generateEvent(MotionEventGenerator.java:8)
at org.mozilla.vrbrowser.input.MotionEventGenerator.generateEvent(MotionEventGenerator.java:1)
at org.mozilla.vrbrowser.input.MotionEventGenerator.dispatch(MotionEventGenerator.java:36)
at org.mozilla.vrbrowser.VRBrowserActivity.lambda$handleMotionEvent$21$VRBrowserActivity(VRBrowserActivity.java:8)
at org.mozilla.vrbrowser.-$$Lambda$VRBrowserActivity$m-PcHRm-UE8sfHU3H9lbI4GkhBc.run(Unknown Source:14)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2adc9fe to
db26bbb
Compare
Contributor
Author
|
It should be solved. I have made Zh-CN and Zh-TW have consistent behaviors. |
db26bbb to
432e989
Compare
432e989 to
ef3bc2f
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3506.
When typing symbols, we can just use
AUTO_COMPOSEmode.I was trying to make Zh-CN and JPN keyboard have the same behavior when typing symbols, using
AUTO_COMPOSEinstead ofSHOW_CANDIDATES. But, JPN keyboard will show.when inserting/。The only way possible is fixing their code book to avoid it, but it is not worth to do. IMO, We can still rely on their code book to feed our data, iOS JPN keyboard uses the same behavior either.