Fixed
Status Update
Comments
ca...@google.com <ca...@google.com> #2
Seems that this issue will never be fixed as google has marked the multiple duplicates as `wont fix`.
ro...@google.com <ro...@google.com> #3
Adding the following block in Support4Demos.onCreate:
ViewCompat.addOnUnhandledKeyEventListener(getListView(),
new ViewCompat.OnUnhandledKeyEventListenerCompat() {
@Override
public boolean onUnhandledKeyEvent(View v, KeyEvent event) {
return false;
}
});
produces:
04-28 17:40:41.523 4608-4608/com.example.android.supportv4 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
04-28 17:40:41.524 4608-4608/com.example.android.supportv4 I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
on a Nexus 6 API 23 emulator before the CL, and no such message with the CL
ro...@google.com <ro...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 6ef009775ee7b4b179cafa28467d3fea6bfbef49
Author: Kirill Grouchnikov <kirillg@google.com>
Date: Tue Apr 28 12:04:52 2020
Extract v28+ calls into a separate static class
So that the new View.OnUnhandledKeyEventListener class
doesn't get loaded on older platform versions.
Bug: 153695093
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.app.KeyEventsTestCaseWithWindowDecor
Change-Id: Id34194f77b9c7a2f0864e38d17ef6039733dee95
M core/core/src/main/java/androidx/core/view/ViewCompat.java
https://android-review.googlesource.com/1295992
Branch: androidx-master-dev
commit 6ef009775ee7b4b179cafa28467d3fea6bfbef49
Author: Kirill Grouchnikov <kirillg@google.com>
Date: Tue Apr 28 12:04:52 2020
Extract v28+ calls into a separate static class
So that the new View.OnUnhandledKeyEventListener class
doesn't get loaded on older platform versions.
Bug: 153695093
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.app.KeyEventsTestCaseWithWindowDecor
Change-Id: Id34194f77b9c7a2f0864e38d17ef6039733dee95
M core/core/src/main/java/androidx/core/view/ViewCompat.java
ap...@google.com <ap...@google.com> #5
This will be in core:1.4.0-alpha01
Description
Requiring a Window instance when constructing WindowInsetsControllerCompat hinders composability, and requires unfortunate hacks like casting the Context to Activity to obtain a Window (which won't return the right instance in all cases, e.g. with
Dialog
s).We should look into removing this dependency, or making it optional.