3

I'm trying to design a table UI for my activity. I would like three columns and a fixed number of rows (so that the view fill all allotted space). Each of the cells should be clickable, and able to host standard widgets such as textview of buttons. I also want to control the scrolling (virtual grid with infinite up/down data). Pretty much something like the image below.

grid with fixed number of rows

What is the recommended way of making a UI like this?

  1. ListView?
  2. TableLayout with dynamically added rows?
  3. Custom class derived from View?
  4. OpenGL?

I tried both 1 & 2, but so far have not been happy (hard to control height of each row). Any comments and code samples welcome.

4

1 回答 1

0

您的应用看起来可以与 DB 一起使用。如果这样TableLayout不适合与内容提供者/加载器/......</ CursorAdapterp> 之类的东西一起使用

自定义视图由您决定,但我认为,基于图像,ListView就足够了。让它自己管理行高,这没什么大不了的。

我不确定OpenGL。对于简单的事情,我会选择ListView/ GridView

于 2013-03-05T08:07:50.060 回答