OutlineSpotShadowColor under API 28

176 views Asked by At

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

There are 1 answers

0
vinoth raj On BEST ANSWER

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