Closed shiva-kumar-R closed 4 years ago
If you look inside the CellViewHolder in the sample app, you will find these two lines :
// It is necessary to remeasure itself.
cell_container.getLayoutParams().width = LinearLayout.LayoutParams.WRAP_CONTENT;
cell_textview.requestLayout();
Putting these lines inside the onBindCellViewHolder, onBindColumnHeaderViewHolder helped solve the issue.
_cellcontainer is the parent layout of your cell.
I kind of put it in all onBind
Here is the file : https://github.com/evrencoskun/TableView/blob/master/app/src/main/java/com/evrencoskun/tableviewsample/tableview/holder/CellViewHolder.java
still having this issue after added
cellContainerView.layoutParams.width = xxx
cellCcontainerView.requestLayout()
.
and
headerContainerView.layoutParams.width = xxx
headerCcontainerView.requestLayout()
.
all of these located on
onBindCellViewHolder
and onBindColumnHeaderViewHolder
condition :
issue :
Was the width of your table changing terribly on scroll? If yes, did you find the solution?