Is there a way to use ChipGroup like a RecyclerView?
See original GitHub issueChipGroup
has some nifty features like selectionRequired
, singleLine
singleSelection
, etc… But since it’s a basic ViewGroup, all I can do is add and remove views (Chip
). I am looking for something like a RecyclerView, where I can have a DataSet and create Chips based on that, which will let me modify the Chips using DiffUtil.
Is there a way I can do this? I could use a RecyclerView directly, but I don’t want to miss out the features already supported by ChipGroup
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
android - Arrange listView or recyclerView items like chipGroup
I recommend Google's flexbox-layout library for this. It provides a FlexboxLayoutManager for use with RecyclerView :
Read more >How to collaboration Chips from Material Design in your life?
You add RecyclerView in ChipGroup at your item view for use in ... Chip can do similar to select one thing and multiple...
Read more >Why do material chips not work efficiently in a recyclerview?
They do work efficiently and as they should. Recycler view, recycles the views that aren't on the screen, you have to remember the...
Read more >Part 4: How to add chips dynamically or programmatically to a ...
Subscribe to my newsletter for any new updates: https://appdevassist.comIn this video, I am showing how to add chips dynamically or ...
Read more >Material Chips list on Android with ChipsLayoutManager
Instead of custom views you use regular RecyclerView with its regular adapter, as you would do every time. They way to plug this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for explaining your use case, this is outside of the mandate of the Material Android library and we have no plans to support this functionality.
@wcshi I think this a reasonable request, especially for the lists with unknown amount of items and
app:singleLine=true
usage. This should be reopened. I don’t understand how is it out of the Material scope? Ideally, you should extract an interface with those handy chip-specific methods and provideViewGroup
andRecyclerView
implementations.