Your First Kotlin Android App - Part 43: About Dialog | Ray Wenderlich

In this video, you'll learn about dialogs and how to use them in your game.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4738-your-first-kotlin-android-app/lessons/43

I Want to show the about menu item, but it is not possible. The xml its OK, the
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
return super.onCreateOptionsMenu(menu)
menuInflater.inflate(R.menu.menu, menu)
return true
}

override fun onOptionsItemSelected(item: MenuItem?): Boolean {
    if (item?.itemId == R.id.menu_item_info) {
        showInfo()
    }
    return true
}

are as it supost to be but I cant See it.

In onCreateOptionsItemSelected(), try replacing the if statement with the following:

if (item.itemId == R.id.about_item)

That should match up with the about item. Let me know if that helps!