-2
我想使用垂直視圖分頁器實現帶圖像的網格視圖活動。請提供任何示例代碼如何在活動中實現Gridview與垂直視圖分頁器
我想使用垂直視圖分頁器實現帶圖像的網格視圖活動。請提供任何示例代碼如何在活動中實現Gridview與垂直視圖分頁器
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)