disable all scroll and fix width with device width(match_parent)
hi thanks for this lib i have two request from you 1-how to disable srcoll? i want all cell in one screen but cant change cell and header width. 2-Width of header is not equal (cell too) https://pasteboard.co/Hi9vjh8.jpg
Hi @VAHID-ZAHEDI
I don't get what you mean that "Width of the header is not equal (cell too)". In the picture, Column Header width values look like same with the width value of related cell items.
how to disable scroll? I want all cell on one screen but cant change cell and header width.
TableView has no any function to disable it. However, these days, I work on setting column width programmatically. So, you can wait for the next release or find out a way to disable scroll on a RecyclerView.
Hi @VAHID-ZAHEDI
I don't get what you mean that "Width of the header is not equal (cell too)". In the picture, Column Header width values look like same with the width value of related cell items.
how to disable scroll? I want all cell on one screen but cant change cell and header width.
TableView has no any function to disable it. However, these days, I work on setting column width programmatically. So, you can wait for the next release or find out a way to disable scroll on a RecyclerView.
Hey,could you please tell me how to set width dynamically?
Hi use NestedScrollView. Maybe the code below can help you While i using to table with four header it was not covering the page.I solved this problem following methods. Optional(I hide the all row items in the table) - binding.myTableView.setAdapter(mTableAdapter); binding.myTableView.setRowHeaderWidth(0); in MyTableViewAdapter:
public MyTableViewAdapter(Context context, int size) { // size :: for dynamic header items mContext = context; screenWidth = utils.getScreenWidth(); headerWidth = (int) (screenWidth / size); }
later i sent header width to Header
public ColumnHeaderViewHolder(TableviewColumnHeaderLayoutBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
public void setColumnHeaderModel(ColumnHeaderModel key, int pColumnPosition) {
// Set text data
binding.columnHeaderTextView.setText(key.getData());
// binding.columnHeaderContainer.getLayoutParams().width = LinearLayout.LayoutParams.WRAP_CONTENT;
i changed this code to this-->
binding.columnHeaderContainer.getLayoutParams().width = headerWidth;
binding.columnHeaderTextView.requestLayout();
}
OK , nice works :)