I am using material chips into my project. Almost every android version shows no problem with it but android 6.0 (marshmallow - API 23). Actually material chips can't be inflated for this android version and crashes every time.
I have tried following things:
- Already updated the theme from style with
Theme.MaterialComponents.Light.NoActionBar
- Checked solution with this
- Created
layout-v23
to show different layout for marshmallow os (API 23)
I am using this chipTheme
from the style.xml
<style name="chipTheme" parent="Widget.MaterialComponents.Chip.Choice">
<item name="chipBackgroundColor">@drawable/bg_chip_text_state_list</item>
<item name="chipCornerRadius">10dp</item>
<item name="chipStrokeColor">#D9D9D9</item>
<item name="chipStrokeWidth">1dp</item>
<item name="android:clickable">true</item>
<item name="android:checkable">true</item>
<item name="chipIconVisible">false</item>
<item name="android:singleLine">true</item>
</style>
// into layout
<com.google.android.material.chip.Chip
android:id="@+id/filter_cat_1"
style="@style/chipTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/chipTextAppearance"/>
I expect to show the same chips with the same custom style into all version of android (API 16 to API 28+). How can I do it?