Listview disable android ripple

304 Views Asked by At

Is possible to disable android ripple effect on ListView? I have disabled it on iOS by this function:

onItemLoading(args: any) {
   if (ios) {
      const cell = args.ios;
      cell.selectionStyle = UITableViewCellSelectionStyle.UITableViewCellSelectionStyleNone;
   } else if (android) {

   }
}

Is it possible on android too?

1

There are 1 best solutions below

5
Manoj On

Try setting selector on native android ListView widget upon loaded event.

onLoaded(event) { 
   if (event.object.android) {
     event.object.android.setSelector(new android.graphics.drawable.StateListDrawable());
   }
}