-
Notifications
You must be signed in to change notification settings - Fork 218
Avoid showing Zh-TW and Zh-CN keyboard candidate view when typing symbols. #3507
Conversation
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.
@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
It should be solved. I have made Zh-CN and Zh-TW have consistent behaviors. |
db26bbb
to
432e989
Compare
432e989
to
ef3bc2f
Compare
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.
Looks consistent now
Fixes #3506.
When typing symbols, we can just use
AUTO_COMPOSE
mode.I was trying to make Zh-CN and JPN keyboard have the same behavior when typing symbols, using
AUTO_COMPOSE
instead 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.