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

Wrong number of cells in a row crashes #401

Open
pe1uca opened this issue Feb 1, 2022 · 0 comments
Open

Wrong number of cells in a row crashes #401

pe1uca opened this issue Feb 1, 2022 · 0 comments

Comments

@pe1uca
Copy link

pe1uca commented Feb 1, 2022

Is your feature request related to a problem? Please describe.
Because of a mistake I made when migrating from another table library, I left an extra column cell (old library's corner)
This makes TableView to crash here with a NullPointerException

public int getFirstItemLeft() {
View firstColumnHeader = findViewByPosition(findFirstVisibleItemPosition());
return firstColumnHeader.getLeft();
}

Describe the solution you'd like
Make TableView library gracefully handle this case.
When commenting this line I was able to prevent the app from crashing

The table will look wrong, but I think is better than the misleading NullPointerException.

Additional context
I followed the wiki for this example, only replacing object by string as data.

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

No branches or pull requests

1 participant