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

OutlineSpotShadowColor under API 28

I'm trying to disable clicking effect on Material Chip. In Api>28 there is outlineSpotShadowColor attribute. And how to handle this on Api<28? In my adapter i'm adding chip and disabling this color: if (Build.VERSION.SDK_INT >=…
0
votes
1 answer

How can i show the selected chips in chip group android

I am working on an property listing application where users can list their property like rooms etc. Now the problem I m facing is in the "update listing details" part. So basically we have four fragments through that user fill their property details…
0
votes
1 answer

Android Chip with material font icon text not wrapping correctly

In my Android app I have a recyclerview with chips inside, and some chip has not just normal text but icons from the material font. @Override public void onBindViewHolder(final ViewHolder holder, int position) { ... ... Chip…
P5music
  • 3,197
  • 2
  • 32
  • 81
0
votes
0 answers

Need advice on what to use to mimic the Ring App Event Slider

I want to copy the event slider that Ring uses for video events for a video entertainment app I'm making, but I don't know what action/event to use for when a chip/date touches the center piece (the middle divider of the video slider that never…
WrapItUp87
  • 290
  • 1
  • 2
  • 15
0
votes
0 answers

How to get the string array form edit text with chips?

I want to make an edit text with the entry of tags in material chip form. After that, I want the tags in a string array. How to achieve that in java android
0
votes
0 answers

In flutter how do i pass the selected value of choice chips widget back as input field for a form

Hi I am using choice chips widget to select from a list of options, how do i pass the selected value as input a form ,am calling the CustomChipWidget() to render chips in the UI page . i am able to print the value of the selected chip but i need to…
0
votes
0 answers

Android ChipGroup: Add child view only in XML to check layout design

I have been trying this scenario. I have a ChipGroup and I only add the Chips dynamically into the group. Now if I want to check the layout design I do it by adding some Chips temporarily in the xml. Then, when the app builds, these temporary Chips…
Sashi Kiran
  • 156
  • 9
0
votes
0 answers

Kotlin Chipgroup

I have a problem, because I have a chipGroup with twoo chips. When user doesnt click nothing is ok, when user click one chip I need to know which (and I can do this), BUT I also need to know that when user clicked second chooise chip from this…
wenus
  • 1,345
  • 6
  • 24
  • 51
0
votes
0 answers

Chip makes weird margins/paddings that disappear when I set icon

So, I make a custom View inherited from Material's Chip. Here's the View itself : class ChipView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : Chip(context, attrs, defStyleAttr) { …
user2234594
  • 305
  • 1
  • 10
  • 19
0
votes
0 answers

Why does applying a style using a ContextThemeWrapper only work for certain attributes?

I'm generating Material.Chip views in my fragment. I'd like to configure their appearance, but I'd like to do so using a style. I've read online that I could use a ContextThemeWrapper like so: Chip chip = new Chip(new…
Cosinux
  • 321
  • 1
  • 4
  • 16
0
votes
0 answers

Getting chipBackground color from a chip

I would like to get the color of my Chip but this way I can't because what I get is ColorStateList. colors.children.forEach { val chip = it as Chip chip.setOnCheckedChangeListener { buttonView, isChecked -> …
Antonio
  • 31
  • 6
0
votes
1 answer

Adding Chips into ChipGroup dynamically: border is not visible?

This is how I make a static ChipGroup
anta40
  • 6,511
  • 7
  • 46
  • 73
0
votes
1 answer

How to set up Chip and ChipGroup attributes properly?

I figured out that app: namespace attributes are not applied to Chip view in my project, though documentation and some sample code I have seen state that they do. What do I do wrong?
0
votes
0 answers

Sorting or filtering Recyclerview with Chips in Android

What is the best way to implement a filtering ChipGroup on a recyclerview? I have an EditText that user can put a value for filtering, after press Enter key a chip is added on the ChipGroup. How I can filter all the users put to the group? Code …
Dúver Cruz
  • 328
  • 1
  • 12
0
votes
2 answers

How to get colors?

I am trying to achieve something like this where the text and background colors are similar. How do I get the corresponding background (probably 50% transparent of chosen color) color for a chip in Android?
Mark Delphi
  • 1,376
  • 1
  • 11
  • 29