Skip to content

Wrong number of cells in a row crashes #401

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions