0

I'm trying to disable clicking effect on Material Chip. In Api>28 there is outlineSpotShadowColor attribute. And how to handle this on Api<28?

In my adapter i'm adding chip and disabling this color:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
    chip.outlineSpotShadowColor = binding.root.context.resources.getColor(transparent)
  } else { What should i do here?}
       

1 Answers1

0

API less the 28 can try the outlineProvider of the chip to null this will disable the clicking effect.

In the else block just add: chip.outlineProvider = null

vinoth raj
  • 96
  • 3