1

I'm a newbie and just trying something simple, but having a hard time to figure this thing out, hopefully you guys can help. I'm creating a very simple app with a main page, and putting a bunch of buttons for the alphabets, right next from each other. Since there are too many buttons to fit into one single line on the screen, what is the best way to have it automatically wrap to the next line, considering viewing it on different screen sizes.

I understand it can be done by calculating the screen size, but it seems simple enough to be done by some simple ways with activity? been looking and trying the layout tags, but nothing seems to work.

Thanks

4

2 回答 2

0

信不信由你,不可能进行这种类型的包装,因为我记得我自己的一个项目需要类似的东西。

我知道这很痛苦,但我建议为不同的屏幕尺寸使用不同的布局文件。或者按照您的建议,获取容器布局的计算宽度并对这些值进行处理。

于 2013-02-08T17:08:42.103 回答
0

这个问题已经问过几次了。基本上你在纯Java中寻找FlowLayout,这里有一个实现

于 2013-02-08T17:10:40.147 回答