question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to use ChipGroup like a RecyclerView?

See original GitHub issue

ChipGroup 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:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

50reactions
wcshicommented, Feb 11, 2020

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.

32reactions
semanticercommented, May 12, 2020

@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 provide ViewGroup and RecyclerView implementations.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found