Search code examples
androidxmlandroid-chips

how to change Chip Background and Stroke color in android with opacity


I want to change com.google.android.material.chip.Chip background with alpha but when I set

app:chipBackgroundColor="#6F000000"

that not work and always have a white background. How can I do this?


Solution

  • I find the solution in this link. chips have a white surface layer underneath their background and you can set the transparent color for that with this :

    app:chipSurfaceColor="@android:color/transparent"