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 454 forks source link

Corner view disappears after returning to Fragment from the back stack if Adapter created in onCreate() #340

Closed KoTius closed 3 years ago

KoTius commented 3 years ago

So I faced this issue. I used to create adapters in fragment's onCreate() and not in onCreateView(). If we do so with TableViewAdapter it works as intended the first time we navigate to the fragment with the table. But If we navigate somewhere else (another tab) and then return to the fragment with the table from the backstack, new Adapter won't be created.

And there are strange issue appears. Whole table redraws as intended, BUT only the corner view disappears. Even though it is not null, visible, have size and parent.

I dunno what happens in the Adapter's constructor so that issue happens.

Created this issue in case someone get it. I spent like 6 hours debugging whole library to find why it happens. Will close it in few days if there won't be any discussion going.