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
0
votes
1 answer

Chip margin issue when I set isCloseIconVisible to false

I am creating Chips dynamically and everything is working fine but when I set isCloseIconVisible and add the chip to ChipGroup then there is some kind of empty space(like margin not padding) at start of chip. How can I resolve that? Any help will be…
Zohab Ali
  • 8,426
  • 4
  • 55
  • 63
0
votes
1 answer

Design Toggle Button with On and Off State in Android

I want to design a button like that (it's a kind of toggle button with on and off); any suggestion or ready library or view to use it directly?
0
votes
1 answer

(android) How to fill the Chip's area?

I want to know how to fill the background of Chip in ChipGroup. Looking at the picture, you can see that the background is not full. It's a round gray area that surrounds the text, not the square part. The strange thing is that i set the width to…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

Material Chip Margin Top does nothing

I have a ChipGroup and two chips inside it. I am trying to add marginTop to the chips but they are stacked on the top of the ChipGroup. The marginStart is working as expected but the marginTop does nothing. Here is my…
Thelouras
  • 852
  • 1
  • 10
  • 30
0
votes
0 answers

How to align Chips vertically one after the other

How to align ChipGroup items vertically one after the other as shown in the image
Anjana
  • 37
  • 9
0
votes
1 answer

How to fill chip group dynamicallly in kotlin?

I have a class of items which contains a String array of keywords. I will try to show every question in a recycler view using Kotlin and every keyword in the new chip. This chips will be included inside the chip group. My chip group XML code…
0
votes
1 answer

Get Chip Text on click chip

I am new to android and trying to play with chips. I have chip group like this in xml
Riya Shah
  • 155
  • 1
  • 12
0
votes
1 answer

Chip() not correctly resizing horizontally

so I have this extension function which is supposed to create a chip. I want the chip to be smaller than normal. fun createChipFromTrait(context: Context, trait: Trait): Chip { val chip = Chip(context) if (trait.probability != null) { …
Lorenzo Benevento
  • 522
  • 1
  • 3
  • 16
0
votes
1 answer

Chip wan't add to ChipGroup programmatically

I have Array list with some values ( Movies categories list ). I'm trying to add the to ChipGroup programatically, but the are not added. Look on this method. private void addCategories(MovieDetailsResponse response) { ChipGroup chipGroup =…
Michael
  • 429
  • 5
  • 22
0
votes
3 answers

How to change background color of Android Material ChipGroup?

I need to dynamically change the background color of the Android Material chips container (ChipGroup) component. I tried setBackground() and setBackgroundTint(). I also tried android:background and android:backgroundTint properties in XML (code…
0
votes
0 answers

How to customize chip style when my app theme inherit from "Theme.AppCompat"?

I want to use the android widget "ChipGroup & Chip" in my app which are from android material 'com.google.android.material', but I am using like principle theme for My App "Theme.AppCompat" so when I try to custom the style for each of theme I…
0
votes
1 answer

Aligning a ChipGroup with an ImageView using ConstraintLayout

I want to center align a ChipGroup beside an ImageView. Here is my XML: ...
0
votes
0 answers

ChipGroup for older android version

i made an app and realized that it doesnt work for older versions cause ChipGroup only works for api level >= 28. I found multiple tutorials that show how to solve this but sadly it didnt work. Is there maybe another way to get a similiar…
Gwinzy
  • 9
  • 1
0
votes
0 answers

Is there a way to somehow implement Action Chips in android with a progress icon?

I was looking for a way to implement an action chip with a progress icon, as shown here in the material component guidelines. There seems to be no documentation regarding it. Someone had asked a similar question here, but the answer provided isn't…
0
votes
1 answer

Filter with chips android

I would like to ask you if exist in component which is an radiobutton, but it is format from chips like this image. it is an component presents in Google Play Games when you want search an game thank for ours response