user3773337
user3773337

Reputation: 2378

Android Ripple effect to Listview items

Is there a way to add ripple effect to Listview items in the android support library since ripple tag only works with API level 21+.

Upvotes: 3

Views: 2259

Answers (1)

Chandru
Chandru

Reputation: 5962

No. You cannot add ripple effect to ListView items using android support library since the support library only supports Lollipop features like FAB, SnackBar, AppBarLayout, FloatingEditText, CoordinatorLayout, CollapsingToolbarLayout, TabLayout, NavigationView. If you need to create custom ripple effect for listitem in ListView follow this tutorial. It has a very good sample creating RippleEffect by extending RelativeLayout, so that you can assign this view as a parent layout in a listitem.

Upvotes: 2

Related Questions