如何设置android的GridView的行固定数量? [英] How to set a fixed number of rows in android gridView?

查看:718
本文介绍了如何设置android的GridView的行固定数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建android的1 GridView控件具有10行和10 columns.How我可以设定的行中的GridView一个固定的号码是多少?

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 ?

推荐答案

的GridView 是不是真的为此而设计的,它是专门用来显示数据的无限量一个高效的滚动方式。如果你想创建一个静态布局,您可以在离散放置的物品在特定的位置,你应该看网​​格布局 TableLayout 代替。

GridView is not really designed for this purpose, it is designed to display an indefinite amount of data in an efficient scrolling manner. If you want to create a static layout where you can discretely place items at specific locations, you should be looking at GridLayout or TableLayout instead.

这篇关于如何设置android的GridView的行固定数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆