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
8
votes
3 answers

how to modify the style of chips?

I need to make the following UI using chips I have already implement the chips and make it checkable, but I do not know how to change the style of it to be like the picture I changed the stroke color and background color and stroke width so the…
8
votes
2 answers

How to set chipText on com.google.android.material.chip.Chip?

I am investigating the material components provided by implementation group: 'com.google.android.material', name: 'material', version: '1.0.0-alpha3' namely com.google.android.material.chip.Chip Using Android Studio version Android Studio 3.2…
Hector
  • 4,016
  • 21
  • 112
  • 211
7
votes
2 answers

Multiple row of chips in chipgroup

I'm fetching a list from my API of for example 25 tags of country such as, Germany, England, France, Italy etc... I'd like to have 2 row with 10 chips per row, and if I get 30 tags the next time I fetch I want to have 3 row of 10 chips etc... So far…
Biscuit
  • 4,840
  • 4
  • 26
  • 54
7
votes
1 answer

how to change Chip Background and Stroke color in android with opacity

I want to change com.google.android.material.chip.Chip background with alpha but when I set app:chipBackgroundColor="#6F000000" that not work and always have a white background. How can I do this?
m.sajjad.s
  • 711
  • 7
  • 19
7
votes
1 answer

Android: Get Chip icon click event

I use material component Chip. In chip we can get close icon click and whole chip click event. But Not able to find chip icon…
Aanal Shah
  • 1,946
  • 2
  • 20
  • 30
7
votes
4 answers

Is it possible to set Material ChipGroup orientation to VERTICAL?

I'm adding a material ChipGroup dynamically to a parent linear layout which is set to VERTICAL orientation but the chip items seem to be added horizontally. Is there any way to make it lay out the chip items vertically? setLayoutDirection() method…
Niaz Ahmed
  • 220
  • 2
  • 12
7
votes
3 answers

Cannot add icon in a Chip

I have implemented 3 Chip within a ChipGroup in my application successfully, but I am having trouble making an icon at the left appear.
user4383363
6
votes
2 answers

ChipGroup with draggable Chips

In my XML I'm just declaring a ChipGroup as follows: And then adding each Chip…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
6
votes
2 answers

How to remove shadow from material Chip android view?

I use android material Chip view It seems it has a shadow in the lower part. Which attribute to way can I use to remove any chance of bottom shadow?
6
votes
8 answers

android chips taking extra spaces;unable to wrap

I use chipgroup with dynamic chips. I want the chips to get wrapped in width according to their text. But it takes extra spaces even without padding. Below is my code: xml:
6
votes
2 answers

Why ChipGroup inside HorizontalScrollView with Chip's marginEnd not working?

I have Chips inside ChipGroup and this ChipGroup inside HorizontalScrollView. But my problem is marginEnd on last Chip not working! I'm tried change layout params programmatically, but not successfull
kovac777
  • 730
  • 6
  • 19
6
votes
4 answers

Using Android Material Chip

Hello I am new to android and learning to use material chips. I have created a test project and added the following to my gradle file i added implementation 'com.android.support:design:28.0.0' and in my fragment xml i added…
user642206
  • 149
  • 1
  • 8
6
votes
3 answers

ChipGroup 2-way binding adapter

I would like to create ChipGroup 2-way binding adapter. I have copied default RadioGroup binding adapter with some changes but it doesn't work for both ways. In case of setting data to observable programmatically, ChipGroup retrieve changes from it.…
Mikhail Sharin
  • 3,661
  • 3
  • 27
  • 36
6
votes
5 answers

Android chips which are horizontally scrollable

I need to implement a solution using android chips in a horizontally scrollable view. All the libraries I found use a multiline solution when having many chips to filter with. However I wish mine to be in a single line and scroll through its…
Michele La Ferla
  • 6,775
  • 11
  • 53
  • 79
1 2
3
15 16