iBobb iBobb - 1 year ago 98
Android Question

NavigationView, a way to uncheck previous selections?

Yesterday I followed 2 tutorials to implement the

component for my Drawer instead of using a
. Since it's a lot smarter, I was wondering if there's an integrated way of keeping track which item is selected and when you select a new one, the old selection is removed?

Or should we implement that logic? Should I just keep 2 integers with the ID of the selected element, one
and one
and uncheck the old one?

Suggestions are welcome, thank you!

The tutorials:


Answer Source

NavigationView does that for you , whenever u select a new item old item is removed and new is selected.


That this wont work for subMenu if u add any

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download