NavigationView Ripple Lost In Support Library 23.1.0 Update
Asked Answered
E

0

5

Using the Design Support Library version 23.0.1, menu items within the NavigationView appear to, by the default, support the ripple animation when selected. However, when upgraded to Design Support Library version 23.1.0 the ripple animation appears to be lost. Is this a bug? Has anyone else noticed this as well and can replicate it? And, better yet, does anyone have a solution?

I first discovered this issue while utilizing the NavigationView via Design Support Library version 23.4.0 and noticed a lack of the ripple effect on menu items. However, it wasn't until I followed this NavigationView tutorial, provided by AndroidForDevs, that I was able to place blame on Design Support Library version 23.1.0.

To replicate and reproduce the issue, checkout this tutorial's sample code, which utilizes Design Support Library version 22.2.0, and bump the version to 23.1.0 in the app's build.gradle. You'll then notice the menu items do not ripple when selected. However, if you revert back to version 22.2.0 or 23.0.1 you'll notice the items ripple when selected.

For reference, here is a link to the Support Library change log. While it mentions an update allowing for custom views within the NavigationView I can't think of why this might have led to the removal of the ripple effect by default as it sounds unrelated. Here is change description word-for-word

Added support for custom views to the NavigationView class by using the app:actionLayout attribute or MenuItemCompat.setActionView() method.

Note: This issue is most easily visualized when the drawer is prevented from closing when a menu item is selected. This can be achieved by commenting this line

Earlie answered 13/6, 2016 at 18:35 Comment(5)
Added to the AOSP Issue Tracker under the Support Library label code.google.com/p/android/issues/detail?id=213077Earlie
Any progress on the bug?Dorothi
@SuperThomasLab unfortunately not. The AOSP bug was marked as obsolete but I followed up and indicated I feel that's inaccurate since I'm still seeing the issue in the current version the support library. Any thoughts? I'll be sure to update this post should I find a solution but right now I'll likely let it goEarlie
Haven't found a solution yet, but will try some stuff today. It's strange though, because apps made by Google do show the ripple animation. Can you tag me if you found a solution? I did notice some other apps on Google Play (not by Google) without the animation.Dorothi
Yeah it is odd, doesn't make sense that they'd be using a really old version of the support library either. I'll keep you posted if I find anythingEarlie

© 2022 - 2024 — McMap. All rights reserved.