public virtual void SetColumnWidth(int columnPosition, int width) { // Firstly set the column header cache map mTableView.GetColumnHeaderLayoutManager().SetCacheWidth(columnPosition, width); // Set each of cell items that is located on the column position mTableView.GetCellLayoutManager().SetCacheWidth(columnPosition, width); }
public SelectionHandler(ITableView tableView) { this.mTableView = tableView; this.mColumnHeaderRecyclerView = mTableView.GetColumnHeaderRecyclerView(); this.mRowHeaderRecyclerView = mTableView.GetRowHeaderRecyclerView(); this.mCellLayoutManager = mTableView.GetCellLayoutManager(); }
public virtual void NotifyCellDataSetChanged() { CellRecyclerView[] visibleRecyclerViews = mTableView.GetCellLayoutManager().GetVisibleCellRowRecyclerViews(); if (visibleRecyclerViews.Length > 0) { foreach (CellRecyclerView cellRowRecyclerView in visibleRecyclerViews) { cellRowRecyclerView.GetAdapter().NotifyDataSetChanged(); } } else { NotifyDataSetChanged(); } }
public ScrollHandler(ITableView tableView) { this.mTableView = tableView; this.mCellLayoutManager = tableView.GetCellLayoutManager(); this.mRowHeaderLayoutManager = tableView.GetRowHeaderLayoutManager(); this.mColumnHeaderLayoutManager = tableView.GetColumnHeaderLayoutManager(); }
public ColumnLayoutManager(Context context, ITableView tableView) : base(context) { this.mTableView = tableView; this.mColumnHeaderRecyclerView = mTableView.GetColumnHeaderRecyclerView(); this.mColumnHeaderLayoutManager = mTableView.GetColumnHeaderLayoutManager(); this.mCellLayoutManager = mTableView.GetCellLayoutManager(); // Set default orientation this.Orientation = Horizontal; //If you are using a RecyclerView.RecycledViewPool, it might be a good idea to set this // flag to true so that views will be available to other RecyclerViews immediately. this.RecycleChildrenOnDetach = true; }
private void ScrollCellHorizontally(int columnPosition, int offset) { CellLayoutManager cellLayoutManager = mTableView.GetCellLayoutManager(); for (int i = cellLayoutManager.FindFirstVisibleItemPosition(); i < cellLayoutManager.FindLastVisibleItemPosition() + 1; i++) { RecyclerView cellRowRecyclerView = (RecyclerView)cellLayoutManager.FindViewByPosition(i); if (cellRowRecyclerView != null) { ColumnLayoutManager columnLayoutManager = (ColumnLayoutManager)cellRowRecyclerView.GetLayoutManager(); columnLayoutManager.ScrollToPositionWithOffset(columnPosition, offset); } } }
public TableViewLayoutChangeListener(ITableView tableView) { this.mCellRecyclerView = tableView.GetCellRecyclerView(); this.mColumnHeaderRecyclerView = tableView.GetColumnHeaderRecyclerView(); this.mCellLayoutManager = tableView.GetCellLayoutManager(); }