evrencoskun / TableView

TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
MIT License
3.14k stars 459 forks source link

Rows vertically scrolled away don't maintain their horizontal scroll position #187

Open jhutarek opened 5 years ago

jhutarek commented 5 years ago

Hi,

thank you for this library! I've run into a small problem: tableview

When I scroll vertically, rows which are scrolled away reset their horizontal scrolling position when they come back.

I've looked at similiar issues here, but this seems to be a slightly different problem. Tested with v0.8.8 and also with master snapshot. Any help or workaround would be greatly appreciated! :)

jhutarek commented 5 years ago

Found a solution: Even if I don't use column headers, it turns out that if the adapter has no items for column header data (I was passing empty list for column header data in setAllItems), it breaks horizontal scrolling. The solution is to pass list of dummy objects (Unit in this case as I use Kotlin) the size of the data row.