SortableTableView: Unable to load rows of data

Hi,

I am using the custom data method for rows. After initialising and calling my DataAdapter, the constructor is executed but not the getCellView overriding method. I believe this is why the rows with data are not loaded. I’m really not sure why this is happening.

So while debugging, I notice my that the data is successfully passed to the constructor but after that nothing happens.

Here is how I’m initialising and calling the adapters (usersList is an ArrayList of objects):

final TableView<Users> GlobalTable = (TableView<Users>) getView().findViewById(R.id.global_tableview);

final TableDataAdapter tableDataAdapter = new TableDataAdapter(getActivity(), usersList); GlobalTable.setDataAdapter(tableDataAdapter);

Then my table data adapter is identical to your custom adapter example

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Very strange. I guess I can’t help here any more without doing some debugging of your code.

I just can give you the following hints:

  • make sure the table is hight enough to show the data section
  • make sure you notify the DataAdapter anytime you manipulate the data (by calling TableDataAdapter#notifyDataSetChanged())
  • make sure the TableDataAdapter returns a number bigger than 0 when calling TableDataAdapter#getCount() (this can be the case, if you use special implementations of List e.g. JsonArray)