Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rendering issue with list views #88

Open
concernedrat opened this issue Nov 9, 2016 · 3 comments
Open

rendering issue with list views #88

concernedrat opened this issue Nov 9, 2016 · 3 comments

Comments

@concernedrat
Copy link

Hi,

Thank you for this interesting project. I am using it along with Jedux as state container. I found an issue trying to use a RecyclerAdapter and RendereableAdapter also; whenever I tried to update individual row states (each item) the whole listview gets updated as well making the scroll go all to the beginning.

Thanks in advance :)

@zserge
Copy link
Collaborator

zserge commented Nov 9, 2016

Hi, do you cache your adapter instance or do you reuse the same one (e.g. inline it like adapter(new RenderableAdapter() { ...})? In the latter case the list will be fully refreshed and the scroll position will be reset. In the first case though the list may seem to not be updated at all, so you will have to call notifyDataSetChanged() from inside your parent view() method

@concernedrat
Copy link
Author

I cached the adapter on the parent view, and it works for RenderableAdapter() but it keeps updating the whole view for RenderableRecyclerViewAdapter, T_T

Thanks.

@niltonvasques
Copy link

niltonvasques commented Nov 13, 2016

I've solved this problem caching the layout manager. I don't know if was the best approach.

See the code here: https://github.com/Catbag/redux-android-sample/blob/c0e5c51b784d73a3d31d384424ac68e0d6f6ef60/app/src/main/java/br/com/catbag/gifreduxsample/ui/components/FeedView.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants