Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

1 vote
1 answer
63 views

How do I set the checked icon of a Chip programmatically?

Is there any way to set a drawable xml asset in a chip programmatically? Just playing around with chips, not forced to use them actually. I can easily swap, but i was wondering if that's possible or ...
Hele's user avatar
  • 345
-1 votes
1 answer
168 views

material chip selection change not working in android

I have created group of chips and when i try try to click on chips below listener is not calling. I want to update the code based on chip selection. chipGroup.setOnCheckedStateChangeListener Below is ...
Techchai Mobile's user avatar
2 votes
1 answer
599 views

Chip: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant)

I want to add a Chip view to ChipGroup in my project but always I get below error My code in Activity for (int i = 0; i < names.size(); i++) { Chip chip = new Chip(getApplicationContext()); ...
abolfazl bazghandi's user avatar
0 votes
1 answer
294 views

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 ...
Leonardo Sibela's user avatar
1 vote
0 answers
186 views

Checked ID more than Child Count in ChipGroup Android when clicked right away

I created a Chip dynamically based on a list, and set OnCheckedChangeListener to the ChipGroup. So supposed there is 2 items in the list, the possible checkedId should be 1 or 2. But i find weird ...
wiryadev's user avatar
  • 1,361
1 vote
1 answer
418 views

Get text from Chips in a ChipGroup

I am using an EditText to create chips in a ChipGroup and I want that you can't create more than one of the same tags: tag & tag as example should not be possible. I could create an array of ...
Andrey's user avatar
  • 73
0 votes
2 answers
739 views

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 ...
Vivek Modi's user avatar
  • 6,129
0 votes
0 answers
462 views

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....
Bitwise DEVS's user avatar
  • 3,156
4 votes
1 answer
1k views

Material Chip input widget can only be used with a Theme.AppCompat

I'm trying to make a ChipInput in my Android App after i've created my layout with a AutoCompleteEditText and a ChipGroup to which i'm adding the dynamically created Chip i get the following error in ...
NiceToMytyuk's user avatar
  • 4,073
3 votes
2 answers
1k views

Android Chip: How to change text vertical padding?

Is there a way to change chip text vertical padding? I dig into the api and it looks like we can only change startPadding and endPadding using : app:chipStartPadding app:chipEndPadding app:...
lyn's user avatar
  • 41
2 votes
2 answers
369 views

change text of material chip

I have a chip group in which chips are being added dynamically. I have to change chip text when text of chip matches "Choose date". But on deselecting the chip the chip text should be ...
Vipin NU's user avatar
  • 311
0 votes
1 answer
185 views

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?
Younes Charfaoui's user avatar
2 votes
1 answer
3k views

implementing a ChipGroup with adapter pattern

My fragment contains a ChipGroup with the chips being added dynamically based on the users choice. What I wish to accomplish is an adapter pattern where a list is exposed to the adapter from which ...
Dhanuesh's user avatar
  • 1,566
2 votes
1 answer
599 views

Chipdrawable custom font text cropped

I want to set a ChipDrawable with a custom font on my EditText. But the font is applied only when I focus the EditText. And the text is cropped... Before focus: After focus the edit text styles.xml ...
Louis's user avatar
  • 364
0 votes
1 answer
1k views

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 ...
ad79h's user avatar
  • 53

15 30 50 per page
1
2 3 4 5