How to get the number of rows of a GridView?

前端 未结 5 870
梦如初夏
梦如初夏 2021-02-07 20:53

Is there a way to get the row count of a GridView for Android API Level 8?

5条回答
  •  甜味超标
    2021-02-07 21:20

    If you take a look at the GridView page from the Android API Guide, you will see there is a method called onItemClickListener, where one of the parameters is the position. Along with getNumColumns() maybe you can get the number of rows.

提交回复
热议问题