How to set a fixed number of rows in android gridView?

前端 未结 5 1882
余生分开走
余生分开走 2020-12-29 22:04

I am trying to create one gridView in android which have 10 rows and 10 columns.How can I set a fixed number of rows in Gridview ?

5条回答
  •  臣服心动
    2020-12-29 23:06

    i dont recommend that but if you use API 14 greater than 14 you can use this code set number of column and rows

    from xml

     
    

    From Java

    setRowCount(int rownumber );
    

    enjoy

提交回复
热议问题