Android Question Looking for Gird/List view that auto determines columns

tsteward

Well-Known Member
Licensed User
Longtime User
I am looking for possible a gridview that I can add buttons to and it will automatically determine the best number of columns based on device.
Attached is what I'm doing now, its a listview with a row layout of 4 buttons. While is suites my phone it's not very effective on smaller or large devices.

Suggestion please,
Thank you
 

Attachments

  • 445387440_433288579599617_3424209901642926571_n.jpg
    445387440_433288579599617_3424209901642926571_n.jpg
    114.7 KB · Views: 19

Lucas Siqueira

Active Member
Licensed User
Longtime User
you can create two layouts, this way you can upload one for the table with a larger screen and another for the phone with a smaller screen

Code:
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
   'phones
  Root.LoadLayout("layoutPhone")
Else
   'tablets
  Root.LoadLayout("layoutTablet")
End If
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Consider using Designer Script Extension (DSE) library and DDDGrid to create the layout.

 
Upvote 1
Top