显示大量“网格”的最佳方法安卓中的数据

发布于 2024-08-25 23:10:17 字数 322 浏览 4 评论 0原文

我正在为 Android (1.5) 构建一个应用程序,在查询网络服务后,向用户显示大量应以“网格”或“表格”样式显示的数据。

我必须显示大约 7 列和 50 行的结果(例如包含姓名、地址、电话号码、去年销售额等的客户列表)。

显然,7 列不会固定在屏幕上,我希望用户能够向上/向下和向左/向右滚动(由于列数而很重要)来探索网格结果。

单元格选择级别不是必需的,因为我需要行选择级别。

获取此界面元素的最佳方法是什么? Listview / GridView / TableLayout

I am building an application for Android (1.5) that, after quering a webservice, shows to the user a big amount of data that should be displayed in a "grid" or "table" style.

I must show a result of about 7 columns and 50 rows (for example a customer list with names, addresses, telephone number, sales amount last year and so).

Obviously, the 7 columns will not fix in the screen and I would like the user would be able to scroll up/down and LEFT/RIGHT (important because of the number of columns) to explore the grid results.

Cell selection level is NOT necessary, as much I would need row selection level.

What is the best approach to get this interface element? Listview / GridView / TableLayout?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

樱&纷飞 2024-09-01 23:10:18

我建议使用一个包含“可扩展”行的网格,以显示包含您可以将其视为详细信息的数据子集的子行。这样,用户可以查看他们感兴趣的行的数据,但忽略其余行。

I would suggest a grid with rows that are 'expandable' to show the child row containing a subset of the data that you could maybe consider as details. That way the user can look at data for the rows they are interested in, but ignore the rest.

吃颗糖壮壮胆 2024-09-01 23:10:18

从你提到的对象来看,你似乎在谈论.NET。在这种情况下,GridView 将以最灵活的方式快速显示数据(最少的编程)。

您所要做的就是将联系人数据分配给网格视图的数据源成员,然后就完成了。

By the objects you mention it looks like you're talking about .NET. In that case GridView will get your data displaying quickly (least programming) and in the most flexible fashion.

All you have to do is assign your contacts data to the grid view's DataSource member and you're done.

请远离我 2024-09-01 23:10:18

我对 Android GUI 编程了解不多,但对我来说最好的方法是使用横向、每页几行(如 5-10)和分页,这样 GUI 就不会变慢。

I don't know much about Android GUI programming, but the best approach for me would be using landscape orientation, few rows per page (like 5-10) and paging so that GUI will not get slow.

与君绝 2024-09-01 23:10:18

查看示例文件夹中的 SlowAdapter、List13 示例。
这可能会回答你的问题。

在我的电脑上,路径是
“sdk文件夹”->android-2.1->samples->ApiDemos->src->com->example->android->apis->view

Check out the SlowAdapter, List13 example in the samples folder.
That might answer your questions.

On my PC the path is
"sdk folder"->android-2.1->samples->ApiDemos->src->com->example->android->apis->view

梨涡少年 2024-09-01 23:10:18

这个二维滚动视图可能就是您正在寻找的: http://androiddevblog.blogspot.com/2009/12/creating-two-dimensions-scroll-view.html

它使用 TableLayout,因此对于非常大的数据集,它可能不是最佳的,因为视图不会滚动时重新使用。但 7x50 可以”

This 2 dimensional scrollview might be what you're looking for: http://androiddevblog.blogspot.com/2009/12/creating-two-dimensions-scroll-view.html

It is using a TableLayout so for reallly large datasets it might not be optimal because the views won't get re-used on scrolling. But 7x50 does'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文