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

Tableview ekrana tam sığmama sorunu #362

Closed mustafacoskunn closed 3 years ago

mustafacoskunn commented 3 years ago

Merhabalar, tableview recylerview columnlarını eğer ekrana sığıyorsa tam şekilde sığdırmak istiyorum bunun için ne yapmam gerekiyor. Şuan yaptığımda tam şekilde sığmıyor 2-3 tane column olursa fotoğrafları ekliyorum. ss (2) ss (1)

evrencoskun commented 3 years ago

Selam Mustafa

TableView icerisinde bunu otomatik cozen bir sey yok maalesef. TableView sadece kolonun olmasi gereken minimum degeri hesapliyor. Yani biraz alan var onu kullanayim demiyor.

Bunu cozmek icin bir yol var ama onu senin yapman gerekiyor.

Gelen kolon genisliklerini alip getColumnWidth(int columnPosition), TableView'in genisligiyle kiyaslayip, bahsettigin durumun olup olmadigini kontrol edebilir, ilgili kolonlara kendin bir genislik atayabilirsin setColumnWidth(int columnPosition, int width)


Unfortunately, there is nothing in TableView that automatically resolves this. The TableView only calculates the minimum value the column should be. So if there is an empty area, it does not say that I may use it.

There is a way to solve this but you have to do it.

By taking the incoming column widths via getColumnWidth(int columnPosition), you can compare with the width of the TableView, check whether the case you have mentioned occurs, you can assign a width to the corresponding columns yourself using setColumnWidth(int columnPosition, int width)

mustafacoskunn commented 3 years ago

yardımınız için teşekkürler artık sığıyor :)