android-chips

Android material chip component crashing app. Unable to inflate xml

蹲街弑〆低调 提交于 2019-11-27 09:26:16
Tried Chip component from both support library com.google.android.support:design:28.0.0-rc01 and material com.google.android.material:material:1.0.0-rc01 StackTrace android.view.InflateException: Binary XML file line #72: Binary XML file line #72: Error inflating class com.google.android.material.chip.Chip at android.view.LayoutInflater.inflate(LayoutInflater.java:551) at android.view.LayoutInflater.inflate(LayoutInflater.java:429)` Layout <com.google.android.material.chip.Chip android:id="@+id/chip" style="style/Widget.MaterialComponents.Chip.Entry" android:layout_width="wrap_content" android

ChipGroup single selection

让人想犯罪 __ 提交于 2019-11-27 03:17:45
问题 How can I force a ChipGroup to act like a RadioGroup as in having at least one selected item always? Setting setSingleSelection(true) also adds the possibility to have nothing selected if you click twice on a Chip . 回答1: A solution would be to preset a clicked chip and then toggling the clickable property of the chips: chipGroup.setOnCheckedChangeListener((chipGroup, id) -> { Chip chip = ((Chip) chipGroup.getChildAt(chipGroup.getCheckedChipId())); if (chip != null) { for (int i = 0; i <

How to add chips from Material Components library to input field in android?

≡放荡痞女 提交于 2019-11-27 01:40:39
问题 I've seen that in android-P google add new material components library which contains material chips: Material components for android Material.io chips usage Material components on GitHub So I decided to add material input chips to my project, but unfortunately didn't find any tutorial how to make that. I want to create something like Gmail chips but without image on the start. Because I'm using appcompat library I tried to use material chips by android.support.design.chip.Chip and android

Chips component in android support library? [closed]

时光毁灭记忆、已成空白 提交于 2019-11-27 01:03:32
问题 This material design show case says about chips component. But I couldn't find example code of this component? How can I use it? please show me XML code and java code. 回答1: Try this library: https://github.com/klinker41/android-chips Check the sample to get the feel for how to use it. 回答2: You do not need to use a 3rd party library to make chips. A chip is basically a TextView with a rounded background. You can add a delete button and an ImageView also to create a view such as the one used

Android material chip component crashing app. Unable to inflate xml

 ̄綄美尐妖づ 提交于 2019-11-26 14:41:53
问题 Tried Chip component from both support library com.google.android.support:design:28.0.0-rc01 and material com.google.android.material:material:1.0.0-rc01 StackTrace android.view.InflateException: Binary XML file line #72: Binary XML file line #72: Error inflating class com.google.android.material.chip.Chip at android.view.LayoutInflater.inflate(LayoutInflater.java:551) at android.view.LayoutInflater.inflate(LayoutInflater.java:429)` Layout <com.google.android.material.chip.Chip android:id="@