From 01f67f775a386bee3acf2a86aadd9d7d67f8c6ce Mon Sep 17 00:00:00 2001 From: Sergio Murguia Date: Fri, 24 Mar 2023 11:59:18 -0700 Subject: [PATCH] Fix nullability of Menu in onCreateOptionsMenu ... override of LoadingActivity and StaggerActivity. The parameter should be non null, but the current override type is Menu? --- .../com/example/android/motion/demo/loading/LoadingActivity.kt | 2 +- .../com/example/android/motion/demo/stagger/StaggerActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Motion/app/src/main/java/com/example/android/motion/demo/loading/LoadingActivity.kt b/Motion/app/src/main/java/com/example/android/motion/demo/loading/LoadingActivity.kt index 92080a32..c26ce2e5 100644 --- a/Motion/app/src/main/java/com/example/android/motion/demo/loading/LoadingActivity.kt +++ b/Motion/app/src/main/java/com/example/android/motion/demo/loading/LoadingActivity.kt @@ -87,7 +87,7 @@ class LoadingActivity : AppCompatActivity() { } } - override fun onCreateOptionsMenu(menu: Menu?): Boolean { + override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.loading, menu) return super.onCreateOptionsMenu(menu) } diff --git a/Motion/app/src/main/java/com/example/android/motion/demo/stagger/StaggerActivity.kt b/Motion/app/src/main/java/com/example/android/motion/demo/stagger/StaggerActivity.kt index ea80e70d..cc42081d 100644 --- a/Motion/app/src/main/java/com/example/android/motion/demo/stagger/StaggerActivity.kt +++ b/Motion/app/src/main/java/com/example/android/motion/demo/stagger/StaggerActivity.kt @@ -77,7 +77,7 @@ class StaggerActivity : AppCompatActivity() { } } - override fun onCreateOptionsMenu(menu: Menu?): Boolean { + override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.stagger, menu) return super.onCreateOptionsMenu(menu) }