如何在活动中使用垂直视图寻呼机实现Gridview

时间:2015-07-10 10:43:17

标签: android

我想使用垂直视图寻呼机实现图像的网格视图活动。请提供任何示例代码

1 个答案:

答案 0 :(得分:0)

i just know scrollview,in fact, its easy.
you should know the icon(ImageView) width and height and line margin、item counts;
then you should calculate the size;
for examples:
screen :480 * 800,screen margin 30
one line we will put n items,one item width 60, height 60 
so the x-item-margin will be (480 - n * 60 - 30 - 30) / n;
and the second line we should calculate the icon left and top too;
so the second line the first item left = 30, top = 30 + 60 + 30 (top-margin +
item height + y-item-margin);

ios coder do this all in its customeView.(no gridView ? i dont konw)