Skip to content

Wrong number of cells in a row crashes #401

@pe1uca

Description

@pe1uca

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions