All Questions
Tagged with material-components-android android-chips
62
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 ...
-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 ...
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());
...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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:...
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 ...
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?
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 ...
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
...
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 ...