Skip to content

Commit

Permalink
Fixed scroll misalignement
Browse files Browse the repository at this point in the history
for some reason the mHorizontalListener doesn't handle the right columnPosition / columnPositionOffset (they are set to 0). This is causing a mis-alignment between Column Headers and Cells.
The TableView hold the right value, so use it.
  • Loading branch information
sonique6784 authored Apr 23, 2018
1 parent 7e030c8 commit fcd3623
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {

// The below code helps to display a new attached recyclerView on exact scrolled position.
CellRowViewHolder viewHolder = (CellRowViewHolder) holder;

int colpos = mTableAdapter.getTableView().getScrollHandler().getColumnPosition();
int colposoffset = mTableAdapter.getTableView().getScrollHandler().getColumnPositionOffset();

((ColumnLayoutManager) viewHolder.m_jRecyclerView.getLayoutManager())
.scrollToPositionWithOffset(mHorizontalListener.getScrollPosition(),
mHorizontalListener.getScrollPositionOffset());
.scrollToPositionWithOffset(colpos, colposoffset);

SelectionHandler selectionHandler = mTableAdapter.getTableView().getSelectionHandler();

Expand Down

0 comments on commit fcd3623

Please sign in to comment.