Description: The ripple animation isn't shown when trying to select an item when one is already selected. This happens if there are less than 6 menu items defined in xml. Adding another item to the menu xml fixes this issue.
Expected behavior: The non-selected items should highlight when touched if an item is already selected.
How to reproduce:
Create a menu xml with 5 items and set it as your menu in NavigationView.
Add an NavigationView.setNavigationItemSelectedListener
Run the app and select an item. Ripples and states work perfectly fine here.
Long press a different item. The touched state doesn't show.
Repeat with 6 menu items and the touched state works perfectly.
Description: The ripple animation isn't shown when trying to select an item when one is already selected. This happens if there are less than 6 menu items defined in xml. Adding another item to the menu xml fixes this issue.
Expected behavior: The non-selected items should highlight when touched if an item is already selected.
How to reproduce:
Source code:
Non-working menu:
Working menu:
Set the listener
Android API version: Android 12 and 11
Material Library version: 1.7.0-alpha02