Open aashitshah26 opened 4 years ago
same problem to me
@juanlabrador @aashitshah26 There's a bug in the library. If you use methods for separate columns, rows & cells setting instead of setAllItems() - corner view is not added to the layout. I had to fix it for myself manually in the code. So for now there are 3 options:
Corner View is currently not shown if any of the column or row headers or cells have no data.
In my case I have column headings but no data for the rows (cells and row headings)> This produces an odd view of:-
I think it a fairly normal case if your have column headings you would want to display the corner view (which is a column heading of the row headings)
If you have zero column heading, zero row heading and zero data then you would expect no corner view as well.
As this is a change in behaviour I feel that this should be optional not to break people who expect the existing behaviour.
I have a change prepared to optionally produced:-
Once I have fully tested it I'll make a pull request for this.
I faced this problem and I found the easiest solution is calling getCornerView() and update view visibility after calling setAllItems() method getCornerView().visibility = View.VISIBLE
@Mohamadkotb no, not works for me. I have to added empty row to end table for showing corner. Thanks @Zardozz
This should be able to be closed with the release of 0.8.9.4
You can now call setShowCornerView(true)
on the tableView before you set the adapter, so that the cornerview is drawn even if you don't have any row headers (and rows)
Results as per comment https://github.com/evrencoskun/TableView/issues/308#issuecomment-651248087
This should be able to be closed with the release of 0.8.9.4
You can now call
setShowCornerView(true)
on the tableView before you set the adapter, so that the cornerview is drawn even if you don't have any row headers (and rows)Results as per comment #308 (comment)
This should be able to be closed with the release of 0.8.9.4
You can now call
setShowCornerView(true)
on the tableView before you set the adapter, so that the cornerview is drawn even if you don't have any row headers (and rows)Results as per comment #308 (comment)
calling showCornerView = true
on the tableView before setting the adapter. However, the corners are not shown.
binding.tableView.showCornerView = true
binding.tableView.setAdapter<ColumnHeader, RowHeader, Cell>(tableViewAdapter)
binding.tableView.setTableViewListener(TableViewListener(binding.tableView))
tableViewAdapter.setAllItems(
tableViewModel.combinedTableData[0].columnHeaders,
tableViewModel.combinedTableData[0].rowHeaders,
tableViewModel.combinedTableData[0].cells
)
My corner view
`<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="@dimen/_80sdp" android:layout_height="@dimen/_40sdp" android:orientation="vertical" android:gravity="center">
`
i have returned this view from method onCreateCornerView()