From d3b4b8fa163ed2fb73cbad4f53eaba830af0f7d3 Mon Sep 17 00:00:00 2001 From: fluffybunny074 Date: Wed, 23 Dec 2020 14:44:34 -0600 Subject: [PATCH] Update GameOverFragment.kt Update Android 4.1.1 Kotlin 1.4.21 --- .../java/com/example/android/navigation/GameOverFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AndroidTriviaNavigation/app/src/main/java/com/example/android/navigation/GameOverFragment.kt b/AndroidTriviaNavigation/app/src/main/java/com/example/android/navigation/GameOverFragment.kt index f5138995e..1a9439259 100755 --- a/AndroidTriviaNavigation/app/src/main/java/com/example/android/navigation/GameOverFragment.kt +++ b/AndroidTriviaNavigation/app/src/main/java/com/example/android/navigation/GameOverFragment.kt @@ -32,8 +32,8 @@ class GameOverFragment : Fragment() { val binding: FragmentGameOverBinding = DataBindingUtil.inflate( inflater, R.layout.fragment_game_over, container, false) - binding.tryAgainButton.setOnClickListener { view: View -> - view.findNavController().navigate(R.id.action_gameOverFragment_to_gameFragment) + binding.tryAgainButton.setOnClickListener { + view?.findNavController()?.navigate(R.id.action_gameOverFragment_to_gameFragment) } return binding.root }