Questions tagged [android-chips]

Chips are compact elements that represent an input, attribute, or action. Chips allow users to enter information, make selections, filter content, or trigger actions. Chips should appear dynamically as a group of multiple interactive elements. Unlike buttons, which should be a consistent and familiar call to action, one that a user expects to appear as the same action in the same general area.

The Chip android component is provided by the Material Components Library.

A Chip represents a complex entity in a small block, such as a contact. It is a rounded button that consists of a label, an optional chip icon, and an optional close icon. A chip can either be clicked or toggled if it is checkable.

Chips may be placed in a ChipGroup, which can be configured to lay out its chips in a single horizontal line or reflowed across multiple lines. If a chip group contains checkable chips, it can also control the multiple-exclusion scope for its set of chips so that checking one chip unchecks all other chips in the group.

240 questions
1
vote
1 answer

Dialog Flow - Follow up Intents after Chips

I am hoping that someone can assist me with the following question. I am using Dialogflow for my chat and how do I build the responses based on what chip they click. I am drawing a blank. I can get the chips added but I am unsure where to build the…
1
vote
3 answers

Material chip crashing app. Cannot inflate xml

My app crashes when trying to inflate the com.google.android.material.chip.Chipclass. The dependency i am using is implementation 'com.google.android.material:material:1.0.0' Here is my XML code
pavlos
  • 547
  • 1
  • 9
  • 23
1
vote
1 answer

Add chip dynamically in each row of recycle view

I have a lists in which each row will consist of multiple chips. On each row I can able to type anything and suggestion would come and if I select any of the suggestion then chip will be added in same row just like auto complete text view. I tried…
1
vote
1 answer

unable to find 'app:closeIconVisible' of material chips

I am trying to use material components via support library. I get the following error when I use chip attributes that begins with "app:....". I haven't preferred to migrate to androidx since it is not stable yet. Should I download android studio 3.2…
1
vote
1 answer

OnPressed Set activeColor to a button of a list, and set inactiveColor to others btns - Flutter

I have a list of Chips, and I want them to change color when user click on them. For instance if I click on the first Chip its color become black, and every other chips are grey. Then if I click on the second Chip its color become black and first…
Armdev
  • 13
  • 3
1
vote
0 answers

TokenCompleteTextView that accept free text next to chips

I am trying to implement chips inside input field that beside chips can accept free text using library splitwise/TokenAutoComplete. One chip is @mention that shows user name. User can enter sign @ and after that popup will show and than user…
1
vote
0 answers

Android add chips anywhere inside EditText

I would like to do something similar to this: In other words, these "tags" are optional and can be placed anywhere inside a text. These tags are used to indicate how the text after it will be treated when the user submits it to the server.
user3900456
  • 2,003
  • 3
  • 25
  • 33
1
vote
1 answer

How to implement Android material chips for contacts selection without a third party library?

How can I implement Android Material Design chips without an external library. Google Apps have it inside their apps, so I guess that it should be available in the native SDK. If yes, how to implement it for a contacts selection functionality.…
LEE
  • 3,335
  • 8
  • 40
  • 70
1
vote
0 answers

Android EditText with chips

I have an app where I have a list of objects in a fragment. Once I click on one of these objects a text will appear into an EditText but as a chip. This chip will have a delete 'x' only, no images. It's not a autocompletetextview but an EditText…
user1341300
  • 375
  • 1
  • 5
  • 19
1
vote
2 answers

Android: Do Google not provide the APIs for chips?

I am now trying to use chips UI, so I started looking for the APIs. But it seems like there are no such APIs for the chips in Android basically provided by Google even though there is an introduction to the UI components of material design chips on…
MarshallLee
  • 1,290
  • 4
  • 23
  • 42
1
vote
1 answer

TextView with different style for each word

I try to display a TextView with a "chips" style for each word. In other words I would like to have this Splitwise TokenAutoComplete not editable and not autocomplete. So I have a drawable for my style : muscle_token_background.xml
Erik Buto
  • 33
  • 4
0
votes
0 answers

NullPointerException on boolean androidx.recyclerview.widget.RecyclerView$ViewHolder.shouldIgnore() when trying to add Chips to a fragment

I want to make a screen where you can filter based on chips. When adding the chips I get the following error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean…
0
votes
1 answer

Flutter chip with label text have changes the label positioning of TextFormField

I tried to create a TextFormField component with chip and label text. code: class BasicChipTextField extends StatelessWidget { const BasicChipTextField( {Key? key, this.testKey, this.label, this.hintText, …
kapil tk
  • 186
  • 10
0
votes
1 answer

How to create 1 viewmodel with savedstatehandle for multiple chips?

I am trying to understand SavedstateHandle and how I can create 1 viewModel that can store multiple Chips using savedstatehandle. At the moment, whenever the user launches an onClickEvent on one of the chips, all the remaining chips get activated as…
0
votes
1 answer

Android - Remove all chips from chipgroup

How do I remove all chips from a ChipGroup? I know I can remove one chip by passing it to the removeView method or one chip by it's index by calling the removeViewAt and passing it's index, but I wanted to remove all views.
Leonardo Sibela
  • 1,613
  • 1
  • 18
  • 39