Fixed
Status Update
Comments
ow...@google.com <ow...@google.com>
al...@google.com <al...@google.com>
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com> #2
I have a similar issue when using android:inputType="numberDecimal" and android:digits="1234567890,."
In 1.3.1 it allowed only a single decimal separator. With 1.4.0 I can input multiple dots and commas.
Even if I set the keyListener to DigitsKeyListener.getInstance("0123456789") in afterTextChanged when the text contains a dot or comma, I can still enter dots and commas.
In 1.3.1 it allowed only a single decimal separator. With 1.4.0 I can input multiple dots and commas.
Even if I set the keyListener to DigitsKeyListener.getInstance("0123456789") in afterTextChanged when the text contains a dot or comma, I can still enter dots and commas.
to...@yahoo.com <to...@yahoo.com> #3
I can cofirm the issue. We have a lot of crashes because of that change.
android:inputType="numberDecimal" stopped working and even if you set allowed digits there - user can type to inputDecimal field "_" "-", "+" - different signs that are showing up on the keyboard. It's not GBoard only issue, confirmed also on other keyboards.
android:inputType="numberDecimal" stopped working and even if you set allowed digits there - user can type to inputDecimal field "_" "-", "+" - different signs that are showing up on the keyboard. It's not GBoard only issue, confirmed also on other keyboards.
ap...@google.com <ap...@google.com> #4
Thanks for the report, I'll prioritize this for the next release.
jb...@google.com <jb...@google.com> #5
Also applies to "number" per
ju...@gmail.com <ju...@gmail.com> #6
I can also confirm that bug after update androidx.appcompat:appcompat to 1.4.0 version keyListener or android:digits in XML work unpredictably.
For example that code allow to write allow characters like ` ' ` or ` ` although they should be prohibited.
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="123456,."
android:inputType="number"
tools:hint="@tools:sample/lorem" />
A similar behavior is observed for set keyListener to eg. DigitsKeyListener.getInstance("123456")
For fast workaround i reverted to 1.3.1 version, but if you need this particular version until it will be fixed you can try override onCreateInputConnection.
For example that code allow to write allow characters like ` ' ` or ` ` although they should be prohibited.
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="123456,."
android:inputType="number"
tools:hint="@tools:sample/lorem" />
A similar behavior is observed for set keyListener to eg. DigitsKeyListener.getInstance("123456")
For fast workaround i reverted to 1.3.1 version, but if you need this particular version until it will be fixed you can try override onCreateInputConnection.
yu...@gmail.com <yu...@gmail.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit cc79ab23d84ed312bb81c2b873ec260dde762b3f
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Dec 02 16:20:29 2021
Don't wrap NumberKeyListeners for emoji
All subclasses of NumberKeyListener do not allow emoji to be input, and
wrapping them breaks locale setting inside of TextView, which is visible
as a change in input filtering behavior.
Fixes: b/207119921
Relnote: "Fixes issue with all NumberKeyListener subclasses introduced
in appcompat 1.4.0 that allowed unexpected characters such as
punctuation to be input ( b/207119921 )"
Test: Manual & ./gradlew :appc:appc:cAT
Change-Id: Iede7af5e0599d29fd4cee78a798d5bcb07e1ab97
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_emoji_activity.xml
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextEmojiTest.java
M samples/Support7Demos/src/main/res/layout/appcompat_widgets_text_input.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEmojiEditTextHelper.java
https://android-review.googlesource.com/1909341
Branch: androidx-main
commit cc79ab23d84ed312bb81c2b873ec260dde762b3f
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Dec 02 16:20:29 2021
Don't wrap NumberKeyListeners for emoji
All subclasses of NumberKeyListener do not allow emoji to be input, and
wrapping them breaks locale setting inside of TextView, which is visible
as a change in input filtering behavior.
Fixes:
Relnote: "Fixes issue with all NumberKeyListener subclasses introduced
in appcompat 1.4.0 that allowed unexpected characters such as
punctuation to be input (
Test: Manual & ./gradlew :appc:appc:cAT
Change-Id: Iede7af5e0599d29fd4cee78a798d5bcb07e1ab97
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_emoji_activity.xml
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextEmojiTest.java
M samples/Support7Demos/src/main/res/layout/appcompat_widgets_text_input.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEmojiEditTextHelper.java
Description
Please see https://issuetracker.google.com/227376894
and the earlier related issue(s)
This needs to be re-opened as the fix mentioned in
is itself introducing a new bug; please the source code for that fix.
Please may I remind you about the contract for onPrepareMenu: called when the menu is first shown
But in your code, you now simply call onPrepareMenu during the onCreateMenu phase.
I realise that Toolbar did/does not implement onPrepareMenu properly up to now, but it never promised to do, so that was ok up to now.
However, if you're adding support for MenuProvider (thank you!) then it has to be implemented such that it's contract is fulfilled. Right now, the contract of the MenuProvider is broken in Toolbar.