Ivan Soto wrote:
Do you have any article/tutorial about the placeholder images to share?
I'm trying to find one with no luck.
I have used the technique, but not in code I'm allowed to share. I do
need to more formally write this up at some point, but I do not have
anything immediately handy.
I've done the same in my apps for ListView (whether they be in
ListActivity or in a plain Activity) with good success.
I use the java.util.concurrent's ExecutorService to obtain images:
1. Your getView(..) (or bindView/newView/etc) needs to assign an image/
thumbnail (bitmap) to an ImageView.
Here is a code-snippet. I may not compile, but i think you'll get the
idea :-)
[code]
ExecutorService EXECUTOR = Executors.newFixedThreadPool(3); // max 3
worker threads.
...
public View getView(final AbsListView listView, View convertView, int
pos, long id) {
...
...
final String imgUrl
Thanks for explaining.
Right now I'm using the efficient list method used on the ApiDemos so when
the user scrolls it will refreshes the images that didn't load before. But
if you don't move anything, even if the image is downloaded it won't redraw
in the imageview.
I will start reading about
I think that's what I'm looking for. Can't wait to give it a try after work.
Although, I have another thread in my main Activity downloading all
pictures.
Thanks, I will give it a try.
Ivan Soto Fernandez
Web Developer
http://ivansotof.com
On Tue, Mar 24, 2009 at 8:37 AM, Streets Of Boston
Ivan Soto wrote:
I'm trying to get the scroll position on a ListActivity. Here is what
I'm trying to do:
I have a list activity that is populated from an XML file. Another
thread downloads all pictures so the user can see the list while the
thread is still downloading the files.
What I'm
ListView does not use scrollY. There's no need to save the scroll
anyway because ListView does it for you.
On Mon, Mar 23, 2009 at 6:26 PM, Ivan Soto ivanso...@gmail.com wrote:
Hi,
I'm trying to get the scroll position on a ListActivity. Here is what I'm
trying to do:
I have a list activity
But when I refresh the listview with setlistadapter(listadapter) it returns
to the top.
Mark:
Do you have any article/tutorial about the placeholder images to share? I'm
trying to find one with no luck.
Thanks for helping.
Ivan Soto Fernandez
Web Developer
http://ivansotof.com
On Mon, Mar
Don't refresh it with setListAdapter! Just modify the content of the adapter
instead.
On Mar 23, 2009 7:03 PM, Ivan Soto ivanso...@gmail.com wrote:
But when I refresh the listview with setlistadapter(listadapter) it returns
to the top.
Mark:
Do you have any article/tutorial about the
9 matches
Mail list logo