gpt4 book ai didi

android - GridView android中每行的不同列号

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:02:19 25 4
gpt4 key购买 nike

我必须使用 Gridview 创建 UI。图片是动态的,因为它来自网络服务。

我可以使用 xml 定义列号,但是第 0 个索引的项目必须有一个完整的图像,然后其余的应该被分成列。

感谢任何帮助。

最佳答案

你应该使用 TableLayout . GridView 不支持跨越操作。

A layout that arranges its children into rows and columns. A TableLayout consists of a number of TableRow objects, each defining a row (actually, you can have other children, which will be explained below). TableLayout containers do not display border lines for their rows, columns, or cells. Each row has zero or more cells; each cell can hold one View object. The table has as many columns as the row with the most cells. A table can leave cells empty. Cells can span columns, as they can in HTML.

你可以看一个例子here .

关于android - GridView android中每行的不同列号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19741717/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com