Fixed
Status Update
Comments
al...@google.com <al...@google.com>
se...@google.com <se...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
se...@google.com <se...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
vo...@gmail.com <vo...@gmail.com> #4
Thank you for a quick fix!
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 56a99dd94838976903e4e5b92987f6b0f9ca29ff
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Mar 03 15:44:47 2022
[bugfix] Appcompat EditText keeps xml clickable or longClickable
Changes
- AppCompatEditText
- AppCompatAutoCompleteEditText
- AppCompatMultiAutoCompleteEditText
All three classes will not reset `clickable` or `longClickable` in
constructor.
This reverts the behavior change introduced by emoji2 in appcompat
1.4.0.
Fixes: b/221094907
Relnote: "AppCompatEditText, AppCompatAutoCompleteEditText,
AppCompatMultiAutoCompleteEditText will no longer reset clickable or
longClickable in the constructor when set in XML."
Test: ./gradlew :appcompat:appc:cAT
Change-Id: Ic5066da9059eab40e3c2bff7c16edc5037430c12
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_emoji_activity.xml
M appcompat/appcompat/src/androidTest/res/layout/appcompat_autocompletetextview_emoji_activity.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatAutoCompleteTextViewEmojiTest.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextEmojiTest.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEditText.java
M appcompat/appcompat/src/androidTest/res/layout/appcompat_multiautocompletetextview_emoji_activity.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextViewEmojiTest.java
https://android-review.googlesource.com/2007911
Branch: androidx-main
commit 56a99dd94838976903e4e5b92987f6b0f9ca29ff
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Mar 03 15:44:47 2022
[bugfix] Appcompat EditText keeps xml clickable or longClickable
Changes
- AppCompatEditText
- AppCompatAutoCompleteEditText
- AppCompatMultiAutoCompleteEditText
All three classes will not reset `clickable` or `longClickable` in
constructor.
This reverts the behavior change introduced by emoji2 in appcompat
1.4.0.
Fixes:
Relnote: "AppCompatEditText, AppCompatAutoCompleteEditText,
AppCompatMultiAutoCompleteEditText will no longer reset clickable or
longClickable in the constructor when set in XML."
Test: ./gradlew :appcompat:appc:cAT
Change-Id: Ic5066da9059eab40e3c2bff7c16edc5037430c12
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_emoji_activity.xml
M appcompat/appcompat/src/androidTest/res/layout/appcompat_autocompletetextview_emoji_activity.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatAutoCompleteTextViewEmojiTest.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextEmojiTest.java
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatEditText.java
M appcompat/appcompat/src/androidTest/res/layout/appcompat_multiautocompletetextview_emoji_activity.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatAutoCompleteTextView.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextViewEmojiTest.java
Description
After switching from appcompat v1.3.1 to v1.4.1 we have noticed change in behavior for
AppCompatEditText
, specifically setting clickable=false from xml no longer have any effect.Affected version: appcomapt v1.4.1
Steps to reproduce:
AppCompatEditText
in xmlandroid:clickable="false"
Actual behavior:
AppCompatEditText
is clickable even though clickable is set to falseExpect Behavior:
AppCompatEditText
should respect clickable attribute set from xml.Additional information:
After looking through the changes to appcompat library, looks like the issue been introduced in:
Add EmojiCompat to AppCompatEditTexthttps://android.googlesource.com/platform/frameworks/support/+/ab8e5e277ffc64b639933b7669fb3945c7f130db
With this change we are now calling
super.setKeyListener(wrappedKeyListener);
from the constructor, which would call
android.widget.TextView#fixFocusableAndClickableSettings
Which in turn would make view clickable again: