Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android GridView change columns numbers

Tags:

android

How can i change Been programmatically Gridview 'android:numColumns="2"' when device size larger than 5 inch Or How can i detect Activity create on tablet and set 'numColumns=3'.

thanks.

like image 500
Behzad Razzaqi Avatar asked Dec 05 '25 03:12

Behzad Razzaqi


1 Answers

Set numColums as auto_fit to Display as many columns as possible to fill the available space.

like image 124
null pointer Avatar answered Dec 12 '25 00:12

null pointer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!