GridView auto fit images

前端 未结 3 777
忘了有多久
忘了有多久 2020-12-23 20:52

im trying to get images displayed in a GridView and get the columns automatically set, so far I\'ve had to manually set the number of columns which is not what i want to do

3条回答
  •  星月不相逢
    2020-12-23 21:07

    A better solution is to measure the width programmatically, so you won't end up with a hard-coded column width:

    Android: How does GridView auto_fit find the number of columns?

提交回复
热议问题