Skip to content Skip to sidebar Skip to footer

How To Highlight Menu Item On Selection?

I have four menu items and I want them to be highlighted on selection. I tried to use item.setIcon(), it works fine but when I select other menu item, the previous one is also high

Solution 1:

Is there any possibility of making only current selection highlighted?

Keep track of what you have highlighted. When you highlight one, remove the highlight from the previous one.

Post a Comment for "How To Highlight Menu Item On Selection?"