Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 217dda4e174cc4ae4d141ab2225b2808f3c0fed9
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Mar 29 21:36:42 2022
Deprecate setHasOptionsMenu API in Fragment
Now that we have the updated menu APIs, we should
encourage developers to add MenuProviders and use the
new APIs to manage menus and their menu items instead
of using the native menu APIs, including setHasOptionsMenu(),
in Fragment.
RelNote: "`Fragment`'s `setHasOptionsMenu()` has been
deprecated. To manage menus and their menu items, the
new menu APIs should be used instead."
Test: ./gradlew updateApi
Bug: 226438239
Change-Id: I7b4b4dd5cfa1922a7ee0d1d4317a52439e780786
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M camera/integration-tests/viewfindertestapp/src/main/java/androidx/camera/integration/viewfinder/CameraViewfinderFoldableFragment.kt
https://android-review.googlesource.com/2048351
Branch: androidx-main
commit 217dda4e174cc4ae4d141ab2225b2808f3c0fed9
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Mar 29 21:36:42 2022
Deprecate setHasOptionsMenu API in Fragment
Now that we have the updated menu APIs, we should
encourage developers to add MenuProviders and use the
new APIs to manage menus and their menu items instead
of using the native menu APIs, including setHasOptionsMenu(),
in Fragment.
RelNote: "`Fragment`'s `setHasOptionsMenu()` has been
deprecated. To manage menus and their menu items, the
new menu APIs should be used instead."
Test: ./gradlew updateApi
Bug: 226438239
Change-Id: I7b4b4dd5cfa1922a7ee0d1d4317a52439e780786
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M camera/integration-tests/viewfindertestapp/src/main/java/androidx/camera/integration/viewfinder/CameraViewfinderFoldableFragment.kt
Description
Now that Fragments support the use of MenuProviders, we should direct users to that route of providing menus and menu items, rather than using the old Fragment menu APIs.