We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 360b981 commit 8df1571Copy full SHA for 8df1571
app/src/main/java/com/example/android/navigation/GameWonFragment.kt
@@ -38,9 +38,6 @@ class GameWonFragment : Fragment() {
38
GameWonFragmentDirections.actionGameWonFragmentToGameFragment())
39
}
40
41
- Toast.makeText(context,
42
- "NumCorrect: ${args.numCorrect}, NumQuestions: ${args.numQuestions}",
43
- Toast.LENGTH_LONG).show()
44
setHasOptionsMenu(true)
45
return binding.root
46
@@ -62,4 +59,11 @@ class GameWonFragment : Fragment() {
62
59
private fun shareSuccess() {
63
60
startActivity(getShareIntent())
64
61
+
+ override fun onOptionsItemSelected(item: MenuItem?): Boolean {
+ when (item!!.itemId) {
65
+ R.id.share -> shareSuccess()
66
+ }
67
+ return super.onOptionsItemSelected(item)
68
69
0 commit comments