Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.evrencoskun.tableview.filter.Filter;
import com.evrencoskun.tableview.handler.ColumnSortHandler;
import com.evrencoskun.tableview.handler.FilterHandler;
import com.evrencoskun.tableview.handler.ScrollHandler;
import com.evrencoskun.tableview.handler.SelectionHandler;
import com.evrencoskun.tableview.layoutmanager.CellLayoutManager;
import com.evrencoskun.tableview.layoutmanager.ColumnHeaderLayoutManager;
Expand Down Expand Up @@ -138,4 +139,11 @@ public interface ITableView {
* @return The FilterHandler of the TableView.
*/
FilterHandler getFilterHandler();

/**
* Retrieves the ScrollHandler of the TableView.
*
* @return The ScrollHandler of the TableView.
*/
ScrollHandler getScrollHandler();
}
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