UweTrottmann / SeriesGuide

Track your favorite TV shows and movies on Android devices.
https://seriesgui.de
Apache License 2.0
1.96k stars 400 forks source link

Migrate setHasOptionsMenu to MenuProvider in fragments #886

Closed UweTrottmann closed 1 year ago

UweTrottmann commented 1 year ago

setHasOptionsMenu was deprecated with the androidx.fragment release in June, 2022.

The replacement MenuProvider API provided by ComponentActivity is documented at https://developer.android.com/jetpack/androidx/releases/activity#1.4.0-alpha01 (which is actually from September 2021, so likely well tested).

Note the current Android Menus documentation does still explain the deprecated way.

Not touching activities, as they may just override onOptionsItemSelected to react to the android.R.id.home button press. Also for activities the method is not deprecated, so not feeling the need to change it.

github-actions[bot] commented 1 year ago

Test Results

27 tests  +27   27 :heavy_check_mark: +27   13s :stopwatch: +13s 12 suites +12     0 :zzz: ±  0  12 files   +12     0 :x: ±  0 

Results for commit 734013f6. ± Comparison against base commit 1f467597.

:recycle: This comment has been updated with latest results.