How to get the number of rows of a GridView?

前端 未结 5 1069
梦如初夏
梦如初夏 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:08

    try this:

    Math.ceil( (double)gridView.getCount() / (double)gridView.getNumColumns() );
    

提交回复
热议问题