Hi, I'm new to Android and I want to write a widget that contains
(about)100 columns, each column contains various amount of child views
(will be determined at run time via some service call). Users can
scroll horizontally and vertically (similar behavior as GridView but
with horizontal scrolling). The child views will be customized widgets
like ImageButton, which will be used to load images and data via
service call when they are exposed on the screen.

I have implemented a 2D scroll view that can enables users to scroll
vertically and horizontally. I'm using a Horizontal Linear Layout as a
container for the columns. However, I'm having trouble designing the
columns. I've thought about implementing in the following ways:

1. Use a Vertical Linear Layout as column and a subclass of
ImageButton as child view. The challenging part is how to load data
and image only when the button become visible and how to dereference
them once they are scrolled off the screen. From what I know Android
doesn't have a method to tell whether a widget is on/off screen (like
the onExpose() method), so I'm not sure if it's possible to do this
(easily).

2. Use some sort AdapterView as column. ListView is very close to what
I'm trying to do but each list view handles its own scrolling and it's
hard to have all columns to scroll vertically together. I'd really
prefer to use Adapter if possible since it recycles the views, which
is really desirable since I'll potentially have thousands of child
views and I'm not sure if I'll run out of memory otherwise.

I'd really appreciate some advice from more experienced Android
developers on how to implement what I described above.

Thanks,
Rachel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to