开发者

Android: Design option for grid of buttons?

I need to design a grid of 2x30 buttons on the screen with labels of names.

What's the best layout-way to create the 2 groups of buttons given the button info/color/title will 开发者_如何学编程be populated from a database.

I was thinking a TableLayout perhaps, then in code create the buttons and add them to cells?


If "2x30" = 30 rows, TableLayout would need to be inside a ScrollView, as you won't have enough room on all screens to show all of that. Your alternative would be a GridView -- that's what the launcher uses, for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜