5

I am trying to achieve ripple effect in android.support.design.widget.NavigationView when item is clicked. I have defined the ripple colour and all in my theme. When long clicking NavigationView's menu items, i can see the correct ripple effect. But when it is a short click, nothing happens - no ripple, no sign of click whatsoever.

I have tried setting app:itemBackground="?attr/selectableItemBackground" for the NavigationDrawer. It does not change anything, the drawer behaves just like before inserting this line.

Please help me get the ripple effect on API 16+. Thank you.

  • none so far. do you have any ideas? – Євген Гарастович Jun 10 '16 at 07:19
  • Unfortunately not, but I'll be taking a new crack at it today. From what I can tell only a few apps support this. For example, even some apps provided by Google, such as Gmail, don't ripple, as far as I can tel, but other apps from Google like Keep very clearly do. Additionally, I found a very simplistic NavigationView tutorial [here](http://www.android4devs.com/2015/06/navigation-view-material-design-support.html) with source code [here](https://github.com/AkashBang/NavigationView), that very clearly has the ripple effect and uses a menu rather than a `ListView`. Let me know if it helps you! – Forrest Bice Jun 10 '16 at 17:59
  • Just opened up a new question [here](http://stackoverflow.com/questions/37796870/navigationview-ripple-lost-in-support-library-23-1-0-update). It appears rippling by default was removed or broken in the 23.1.0 Design Support Library update – Forrest Bice Jun 13 '16 at 21:02
  • Forrest, I replaced NavigationView with
    . it's fully customizable and i can have any views i want, including ripple animation on list items. Hope it helps
    – Євген Гарастович Aug 04 '16 at 13:20

0 Answers0