grennis / expandablerecyclerview Goto Github PK
View Code? Open in Web Editor NEWRecycler view adapter that adds expandable / collapsible items
License: MIT License
Recycler view adapter that adds expandable / collapsible items
License: MIT License
How i get the OnGroupExpandListener() & OnChildClickListener() ?
When creating an ExpandableRecyclerAdapter.ListItem, is it possible to set a property so that it is expanded by default, instead of calling expandItems on each of them after finish with setItems()?
Thanks
Hi there,
Thanks for your prompt response.
I'm going to show users a selected state for children rows. but Library each time user open parent row, insert new row and change the position! then when user scroll the list, may have see multiple row is selected!!
I'm using SparseBooleanArray
to map integer to Boolean for this goal. but when position had change this solution is worthless!
How you handle it?
Hi there,
First, thank you very much for your great library, it saves me a lot of time and it is really tough and stable !
However, I'm encountering an issue in production on version 0.9.3. I can't reproduce it on my side but perhaps this stack trace could help you ? The index of 4 is just an example, it apparently happen in many situations.
Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4 at java.util.ArrayList.get(ArrayList.java:437) at com.innodroid.expandablerecycler.ExpandableRecyclerAdapter.isExpanded(ExpandableRecyclerAdapter.java:160) at com.innodroid.expandablerecycler.ExpandableRecyclerAdapter.toggleExpandedItems(ExpandableRecyclerAdapter.java:91) at com.innodroid.expandablerecycler.ExpandableRecyclerAdapter$HeaderViewHolder.handleClick(ExpandableRecyclerAdapter.java:78) at com.innodroid.expandablerecycler.ExpandableRecyclerAdapter$HeaderViewHolder$1.onClick(ExpandableRecyclerAdapter.java:72) at android.view.View.performClick(View.java:6312) at android.view.View$PerformClick.run(View.java:24811) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:171) at android.app.ActivityThread.main(ActivityThread.java:6649) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
There is no particular device affected by this issue, affecting all brands, on Android 5->8 during the last 30 days.
Do you have any idea on why or how this could happen?
Again, thank you for your great work, and in advance for your help :).
When using the demo app code i get an error with the view holders
Invalid super type 'com.innodroid.expandablerecycler.ExpandableRecyclerAdapter.HeaderViewHolder'
Items order change after removal.
Thanks for lib. :)
but how to add onclicklistener to items ?
Hi,
I need to close the previously opened parentview in list items.
For eg:
This is my requirement ...how to achieve this?
Hello,
I have implemented the expandable Recycler view & its working fine. I am having a functionality that I need to refresh the child items with respect to parent item click. How to achieve it?
Greetings!
I'm trying to use this lib with GridLayoutManager.
But when I've done this, the result was not as I expected.
When all tabs are expanded thats fine. In other cases it's looked wired.
I use this code in my Activity.
final GridLayoutManager manager = new GridLayoutManager(this, 2);
recycler.setLayoutManager(manager);
final PeopleAdapter adapter = new PeopleAdapter(this);
recycler.setAdapter(adapter);
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return adapter.isHeader(position) ? manager.getSpanCount() : 1;
}
});
Hi there
There is a issue with this adapter, I've to get categories and their subcategories from rest API.
As usual after parsing and making my List and assign that to Adapter, I use notifyDatasetChanged()
method to notify Adapter.
Issue is there! Adapter does not recognize the change!
another odd action: notifyDatasetChanged()
close the open parent but the arrow still remain in it's open state! ( When I populated the adapter with fake data like yours sample app ).
Is there any custom method for this?
I have use your class for creating an expandable list and its work nice. I changed that arrow rotate 180 degrees, instead of 90, but now when i scroll down and scroll back (list have about 20 items) arrow is not in rotating position.
can i use it on api level 14 or below?
please help
how to add json data in to this library..... using asynchronous http client
How to add item decorator to header and child separatedly in expandable recyclerview
Can i add google map in child view of item. As in every group respective of item their will be map. Is that possible ?
I need to take child cound of the recyclerview. When a child ia expanded and after that when I took a count it is returning expanded child detaila. How to avoid this. I need only child data without expanded item details.
Can you add a child layout based on the parent layout
Fragment overlapping error when i use expandable recyclerview
i want to put a button in the child of the header and when push the button appears in the header a image but i dont know how can to do for catch the view of the header for to do visible the image in the header.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.