需要产生S preadsheet像控制,我应该延长的ListView GridView的还是? [英] Need to create spreadsheet like control, what should I extend ListView or GridView?

查看:94
本文介绍了需要产生S preadsheet像控制,我应该延长的ListView GridView的还是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个有经验的开发人员,但我在Android平台上缺乏经验。所以,我要求开发商一些建议与Android的更多的经验。

I am an experienced developer, but I'm inexperienced on the Android platform. So I am seeking some advice from developers with more experience with Android.

我建立使用一个片段应用蜂窝。其中一个片段在垂直滚动能够只读HTML表样视图与动态加载的数据呼叫。类似A S preadsheet,我应该有,我可以实现服务器端的请求进行过滤可点击页眉/数据进行排序。

I am building a Honeycomb application using Fragments. One of the fragments calls for a vertically scroll-able read-only "HTML table-like" view with dynamically loaded data. Similar to a spreadsheet, I should have clickable headers which I can implement server-side requests to filter/sort the data.

我是pretty确保这种控制尚不存在,对吗?我一定要建立它?

I am pretty sure this Control doesn't exist yet, am I right? Do I have to build it?

假设我已经建立了,它现有的小部件,我应该延长? ListView控件,表,GridView的?

Assuming I have to build it, which existing widget should I extend? ListView, Table, GridView?

我假设我将对头一个微件,然后包裹在表的主体中的可滚动布局来处理,同时保持头可见滚动。我担心我可能无法保证标题行与列。

I assume I would have one widget for the header, and then wrap the body of the table in a scrollable layout to handle scrolling while keeping the header visible. I am concerned that I might not be able to guarantee that the headers line up with the columns.

由于提前,

推荐答案

Android的布局是pretty基本的 - 没有任何附带的布局,将真正做到你所寻找的自动,但你可能会做你想用严格的控制GridView控件。 Android是还pretty不好控制多个元素以适应屏幕尺寸范围内,因为它的目标是支持多种屏幕尺寸和密度。

Android layouts are pretty basic - there are not any shipped layouts that will really do what you are looking for automatically, but you could probably do what you want with a heavily controlled gridView. Android is also pretty bad about controlling multiple elements to fit within the screen size, as it's goal is to support multiple screen sizes and densities.

据我了解你的愿望是,我认为最好的解决方案是动态创建一个NX2网格视图和控制基于设备尺寸视图的宽度。你将不得不在顶部标题的N多,你可以填写表格的下半部分与textViews,或任何数据你想要的。难的部分将被保持在控制之下,并在屏幕上的网格元件的宽度。此外,你可能会发现,你只能容纳少数头项目在屏幕上,因为手机的尺寸小,所以你可能会发现一个更好的布局,以满足您的需求。

From what I understand your desire to be, I think the best solution is to create a nx2 grid view dynamically, and control the width of the view based on the device size. You would have n number of headers on the top, and you could fill the lower half of the grid with your textViews, or whatever data you wanted. The hard part would be keeping the widths of the grid elements under control and on the screen. In addition, you will probably find that you can only fit a small number of header items on the screen because of the phone's small size, so you may discover a better layout to fit your needs.

这篇关于需要产生S preadsheet像控制,我应该延长的ListView GridView的还是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆