0

I figured out that app: namespace attributes are not applied to Chip view in my project, though documentation and some sample code I have seen state that they do. What do I do wrong?

 <com.google.android.material.chip.Chip
                        style="@style/Widget.Material3.Chip.Filter"
                        android:id="@+id/chip1"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:layout_marginHorizontal="20dp"
                        app:chipStrokeColor="#F0F"
                        app:chipStrokeWidth="1dp"
                        app:chipBackgroundColor="@color/biz_500"
                        app:chipMinHeight="48dp"
                        app:chipCornerRadius="7dp"
                        android:text="@string/text_input_girl"
                        android:textSize="11sp"
                        android:textAlignment="center"  />

I also use Theme.Material3.Light.NoActionBar in application manifest. I tried to switch to MaterialComponents, but it looks even worse.

1 Answers1

0

Chips Attitude is Normal

<com.google.android.material.chip.Chip
    style="@style/Widget.MaterialComponents.Chip.Entry"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/_10sdp"
    android:text="@string/app_name"
    android:textAllCaps="true"
    android:textColor="@color/white"
    android:textSize="@dimen/_10sdp"
    android:textStyle="bold"
    app:checkedIcon="@drawable/ic_close_24"
    app:checkedIconEnabled="false"
    app:checkedIconTint="@color/white"
    app:checkedIconVisible="true"
    app:chipBackgroundColor="@color/purple_500"
    app:chipCornerRadius="@dimen/_10sdp"
    app:chipEndPadding="@dimen/_10sdp"
    app:chipIconSize="@dimen/_100sdp"
    app:chipMinTouchTargetSize="@dimen/_50sdp"
    app:closeIcon="@drawable/ic_close_24"
    app:rippleColor="@color/white" />

Chip Four Type

  1. style="@style/Widget.MaterialComponents.Chip.Entry"
  2. style="@style/Widget.MaterialComponents.Chip.Action"
  3. style="@style/Widget.MaterialComponents.Chip.Choice"
  4. style="@style/Widget.MaterialComponents.Chip.Filter"