I need to dynamically change the background color of the Android Material chips container (ChipGroup
) component. I tried setBackground()
and setBackgroundTint()
. I also tried android:background
and android:backgroundTint
properties in XML (code below) just to check. But they are not working either. Any idea how to do this?
<com.google.android.material.chip.ChipGroup
android:id="@+id/chips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:background="@color/tw__transparent"
android:backgroundTint="@color/tw__transparent"
app:ensureMinTouchTargetSize="false"
app:chipSpacing="2dp"/>