Fixed
Status Update
Comments
ja...@google.com <ja...@google.com>
il...@google.com <il...@google.com> #2
Related ticket:
il...@google.com <il...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c0fd11cab1b083d043dfd54c8431c4068aeef09a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Nov 04 17:35:35 2020
Add Modifier.focusable
This CL adds Modifier.focusable, which is intended to be a primary way to add focusability to the app (without clicks or with custom clicks), since it contains proper a11y and InteractionState support
Change-Id: I41eb9d67669e19f8a7c20804c836a8c6dc0b5526
RelNote: "Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility."
Bug: 152525426
Bug: 162865824
Bug: 163423216
Test: added
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/HighLevelGesturesDemo.kt
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/FocusableSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/FocusableTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Interaction.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Assertions.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Filters.kt
https://android-review.googlesource.com/1487281
Branch: androidx-master-dev
commit c0fd11cab1b083d043dfd54c8431c4068aeef09a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Nov 04 17:35:35 2020
Add Modifier.focusable
This CL adds Modifier.focusable, which is intended to be a primary way to add focusability to the app (without clicks or with custom clicks), since it contains proper a11y and InteractionState support
Change-Id: I41eb9d67669e19f8a7c20804c836a8c6dc0b5526
RelNote: "Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility."
Bug: 152525426
Bug: 162865824
Bug: 163423216
Test: added
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/HighLevelGesturesDemo.kt
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/FocusableSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/FocusableTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Interaction.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Assertions.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Filters.kt
[Deleted User] <[Deleted User]> #4
focusable and hoverable have been added.
Filed separate bugs for 2d scroll (
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 49bd23aeb52f5975d60c1dbb7cf0318bffee6e35
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Mar 11 18:58:54 2020
Use correct layout inflater in PreferenceDialogFragment
In onCreateDialogView() PreferenceDialogFragment uses the wrong
LayoutInflater to inflate the DialogView. Instead of the layout inflater
from the context, it should use its own layout inflater (which is
correct since aosp/1253912).
Test: added PreferenceDialogFragmentCompat
Bug: 150051716
RelNote: "PreferenceDialogFragmentCompat will no longer throw an
IllegalStateException when inflating a FragmentContainerView from xml."
Change-Id: I6eb6031eb7d0ab1f442d8c1b7463c727089fbf20
M preference/preference/build.gradle
A preference/preference/src/androidTest/java/androidx/preference/tests/PreferenceDialogFragmentCompatTest.kt
A preference/preference/src/androidTest/res/layout/inflated_fragment_container_view.xml
A preference/preference/src/androidTest/res/layout/inflated_fragment_tag.xml
A preference/preference/src/androidTest/res/layout/simple_layout.xml
A preference/preference/src/androidTest/res/xml/test_fragment_container_dialog_preference.xml
A preference/preference/src/androidTest/res/xml/test_fragment_tag_dialog_preference.xml
M preference/preference/src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java
https://android-review.googlesource.com/1255984
Branch: androidx-master-dev
commit 49bd23aeb52f5975d60c1dbb7cf0318bffee6e35
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Mar 11 18:58:54 2020
Use correct layout inflater in PreferenceDialogFragment
In onCreateDialogView() PreferenceDialogFragment uses the wrong
LayoutInflater to inflate the DialogView. Instead of the layout inflater
from the context, it should use its own layout inflater (which is
correct since aosp/1253912).
Test: added PreferenceDialogFragmentCompat
Bug: 150051716
RelNote: "PreferenceDialogFragmentCompat will no longer throw an
IllegalStateException when inflating a FragmentContainerView from xml."
Change-Id: I6eb6031eb7d0ab1f442d8c1b7463c727089fbf20
M preference/preference/build.gradle
A preference/preference/src/androidTest/java/androidx/preference/tests/PreferenceDialogFragmentCompatTest.kt
A preference/preference/src/androidTest/res/layout/inflated_fragment_container_view.xml
A preference/preference/src/androidTest/res/layout/inflated_fragment_tag.xml
A preference/preference/src/androidTest/res/layout/simple_layout.xml
A preference/preference/src/androidTest/res/xml/test_fragment_container_dialog_preference.xml
A preference/preference/src/androidTest/res/xml/test_fragment_tag_dialog_preference.xml
M preference/preference/src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java
jb...@google.com <jb...@google.com> #6
This has been fixed internally and will be available in the Preference 1.1.1 release.
Description
When I replace the <fragment> tag with <androidx.fragment.app.FragmentContainerView> as lint suggests and I click the DialogPreference, it results in a crash. (stack trace posted below)
I'll happily provide some code snippets if necessary.
android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class androidx.fragment.app.FragmentContainerView
Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class androidx.fragment.app.FragmentContainerView
Caused by: java.lang.IllegalStateException: FragmentManager is already executing transactions
at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1778)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1814)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:303)
at androidx.fragment.app.FragmentContainerView.<init>(FragmentContainerView.java:166)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:51)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:135)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:356)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:335)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:780)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at androidx.preference.PreferenceDialogFragmentCompat.onCreateDialogView(PreferenceDialogFragmentCompat.java:228)
at androidx.preference.PreferenceDialogFragmentCompat.onCreateDialog(PreferenceDialogFragmentCompat.java:147)
at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:403)
at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1484)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1187)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)