Computer scienceMobileAndroidUser InterfaceUI components

Menus: Options, Popup

Handling a CheckBox

Report a typo

We have a menu consisting of a single checkable item. Rearrange the scattered lines of code to make our callback work properly.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                R.id.detailed -> {
              
                }
              
                showDetailedInfo = !showDetailedInfo
              
                true
              
                override fun onMenuItemSelected(menuItem: MenuItem): Boolean = when (menuItem.itemId) {
              
                else -> false
              
                menuItem.isChecked = showDetailedInfo
              
                }
              
___

Create a free account to access the full topic