-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
TableView cell items are garbled #41
Comments
You shouldn't give a drawable object as a data to the cell model. It can be primitive data type like "int" or whatever you want. In this case, I would like to set data 1 or 0 value respectively for "happy" and "sad". Beside this, as you know that each cell model store the data. In your case it stores drawable, This may cause memory problems for a large-scale TableView. So how do you set icon using primitive data type ? When they are binding, control the value whether is 0 or 1. and set the right drawable at that time. There is also sample usage of this approach on TableViewSample App Edit: I have also fixed the this issue. Please test the case again. And let me know the result.
I sincerely appreciate you taking the time to improve the library. See you. |
Oh yeah, sorry, my bad there for passing the Drawable object directly to the VHs instead of just basic data type. Also sorry for not implementing properly in the examples. Thank you very much for correcting the issue. |
No problem @jeremy-ingenuity :) Have a nice week |
Hi again, this issue is completely unrelated to any extended feature (row/column hiding/showing, scrollingTo row/column, sorting, filtering or pagination) of the TableView. This happens when the TableView is scrolled too fast to the right. The data of cells can all be strings or in my case, there are cells that displays a drawable.
Notes:
One thing I can suggest is to use
setItemViewCacheSize(int size)
method of the RecyclerView for the data cells to preserve the layout and data of "offscreen views". The size to be set should be the number of items in the adapter.Once again, no pressure, take your time man. I just want to help in improving your library.
The text was updated successfully, but these errors were encountered: