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
2 answers

Chip Drawable giving error in Material UI 3 Android Kotlin

hey I am working in android with material ui 3. I am getting error when I used this code. I am trying to set style through programmatically and I am getting error. I want to create tag through using android chip provide by google. But I don't…
0
votes
2 answers

How to increase width of ChoiceChip to same value for all?

I am using https://api.flutter.dev/flutter/material/ChoiceChip-class.html and I want to make them same size. I found out this solution How to increase the width of a chip in flutter but padding is not solution because then width depends on text size…
0
votes
2 answers

best way to manage filters with a custom style

I work on an Android app and I need to implement filters based on the app design guidelines. There are 2 kinds of filters: with an icon without an icon The filter can be selected/unselected (or checked/unchecked) Each case can be visible…
0
votes
0 answers

Scroll to selected chip in horizontalScrollView

I have HorizontalScrollView , Which has a Horizontal Linear layout with 7 chips. In which some chips are out of screen. Selected chipID is stored in DataStore (branchTypeID) So now the next time this view(BottomSheetDialog) is created. I want to…
0
votes
2 answers

Material Chip the selection behavior doesn't work

I can't understand how the Chip works. I want to do a a view which contains dynamic filters to select. When I select a chip, there is a press effect (OK), but the chip doesn't stay in the selected state... I did this quick example in XML. The result…
anthony
  • 7,653
  • 8
  • 49
  • 101
0
votes
0 answers

Problem working with chips programmatically

I'm adding chips into chipGropup programatically like this XML
Electrocode
  • 127
  • 1
  • 8
0
votes
1 answer

Draw Chip inside ChipGroup over border of MaterialCardView

I am making the layout for a recyclerview row, and I want ChipGroup to draw over the border of the MaterialCard like in this mockup: The problem is that it doesnt matter what parent layout I use, or if I disable clipChildren, the chips never…
0
votes
1 answer

How to center align Chips in ChipGroup?

I've 3 chips, and what I want to achieve is to align the 1st chip to be at the start, the 2nd in middle and 3rd at the end of screen horizontally. I also want to ask how can I add new line in chipgroup, like adding 3 chips in 1st line then TextView…
0
votes
0 answers

Same Material Chips are added again to ChipGroup when RecyclerView is scrolled up/down

As the official material.io documentation says: Chips are compact elements that represent an input, attribute, or action. I want to add chips as attributes (tags) for any blog post, a recyclerview is used to show the list of blog…
Arshad Ali
  • 3,082
  • 12
  • 56
  • 99
0
votes
1 answer

Extra end and start margin with chips

How can i remove extra margins or (spacing) from chips inside chip group? below is all things that i try in styles,code and xml none of these work for me. Here is how it's looks: And here is what i try and my code:
Sami Shorman
  • 149
  • 1
  • 11
0
votes
1 answer

Custom AutoCompleteTextView with custom Adapter for DropDown ignoring onItemClick

So I made a custom AutoCompleteTextView and a custom Adapter. Everything works as long as I use TextView to display data in the dropdown, the click event gets triggered and the TextView gets filled with the selected text. So far so good. Troubles…
0
votes
2 answers

Add a circular progress icon inside the chip view

I want to add a circular progress icon like Inside a chip view in android. Some thing like this as the end product Excuse the background of the progress bar indicator. I am not able to find any thing regarding this. Any suggestion?
Bug Hunter 219
  • 312
  • 1
  • 14
0
votes
0 answers

ChipGroup setOnCheckedChangeListener no callback when setChecked is done programmatically

I am creating a Chips at runtime to populate ChipGroup that is in single selection mode, I am programmatically also set check state to true on a first inflation but I noticed that chipGroup.setOnCheckedChangeListener is never return a callback…
0
votes
0 answers

Recyclerview recreating dynamic chips on scroll

I am creating a RecyclerView which has an item with dynamic chips. I am looping through an array to set the text of the chip, this works fine but when I scroll the RecyclerView, more chips gets created class Adapter(activity: Activity):…
0
votes
1 answer

Single chip with multiple options in android

I'm trying to create a chip similar to the google play books one. With a similar behavior to this: Do I need to create a custom class extending Chip or ChipDrawable?
A_Jayke
  • 153
  • 1
  • 12