evrencoskun / TableView

TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
MIT License
3.14k stars 459 forks source link

How to set individual cell width dynamically? #189

Closed diptikas closed 5 years ago

diptikas commented 5 years ago

My requirement is to set cell width dynamically as per text length so I don't want to reset complete column width as per current implementation column will take width of longest cell .

I want to set individual cell width and scroll properly.

Please tell me how to achieve that?

LunevNF commented 5 years ago

Just set чоПопалоКласс.СделатьЧоПопало(); and all be okay

evrencoskun commented 5 years ago

With 0.8.8 version, Column width values can be set programmatically using the below function.

setColumnWidth(int columnPosition, int width)

utsavdotpro commented 3 years ago

Hi @evrencoskun, where should I call this setColumnWidth()?

I am doing it like this and it's not working

tvProducts.post(() -> { tvProducts.setColumnWidth(0, 1000); });

tvProducts being my TableView