Android的GridView控件填充次序 [英] Android GridView filling order

查看:303
本文介绍了Android的GridView控件填充次序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2列的gridview的。默认情况下,在GridView从左至右填充:

I have a gridview with 2 columns. By default the the gridview is filled from left to right:

    |1|2|
    |3|4|
    |5|6|

但在我的项目,我需要它从顶部填充底:

But in my project i need it to be filled from top to bottom:

    |1|4|
    |2|5|
    |3|6|

任何人都可以点我到正确的方向,以实现这一目标?

Can anybody point me to the right direction to achieve this?

推荐答案

查看 TwoWayGridView库

它可以让你的滚动方向设置为横向和将调整你的项目,你所希望的方式

It lets you set the scrolling direction to horizontal and will align your items the way you want

这篇关于Android的GridView控件填充次序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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