دنبال کننده ها

۱۳۹۶ اسفند ۲۴, پنجشنبه

android - Expandable/Collpase layout in Recycler view - Fetch API and create dynamic view in expandable layout not showing data when scrolled

[ad_1]



Kindly help me out for this situation.



I'm having recyclerview and on view click I used your library for expand and collapse. Issue here is expandableview layout has been created dynamically based on the API response. So on the time of API loading if I scroll the layout then the view not updated with the records from API.



I'm calling the API only on click of recyclerview item row and fetching the API and constructing the layout.



onBindViewHolder will get called on scroll and view got refreshed. But I'm not sure how to load childview data when scrolled.



I inserted "notifiyItemChanged" in OnBindHolder but it throws exception layout can be refreshed on scroll Illegal state exception. Kindly share your thoughts.



Library which I used inside Recycler view for expand/collapse - https://github.com/cachapa/ExpandableLayout



Thank you




[ad_2]

لینک منبع