How does ListActivity create multiple list items

by Disco Stu 010 » Wed, 02 Jul 2008 01:05:12 GMT


Sponsored Links
 Hello,

A question for the experts on how ListActivity does its job.

My understanding of the documentation is that to give a custom look to  
ListActivity, one needs to provide a template View (through  
setContentView) that contains a ListView object with the ID "list".  
ListActivity then proceeds to use this template for all the rows it  
displays.

My question is, how does ListActivity create multiple instances of  
these ListView objects? (one for each row)  If using the  
"findViewById() method", one ends up with a single View object. Is  
there a straightforward way to create clones of a view object?

Any insights will be greatly appreciated.  I would like to do  
something similar but with a TableLayout. Specify a template for each  
column in the table and be able to instantiate view objects for each  
table cell.

Thanks,
DS.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How do I write Android.mk for an application using com.google.android.maps.jar

Hi

I am developing an application using com.google.android.maps.jar
It is OK to develop it with Eclipse SDK.
but an build-error happens when building system.img with GMS licence
(com.google.android.maps.jar is already installed at out/target/common/
obj/JAVA_LIBRARIES/com.google.android.maps.jar_intermediates/
com.google.android.maps.jar)

make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/
com.google.android.maps.jar_intermediates/javalib.jar', needed by `out/
target/common/obj/APPS/LifeStory_intermediates/classes-full-
debug.jar'.  Stop.

Here is my Android.mk

#===================================
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := user

# List of static libraries to include in the package
LOCAL_STATIC_JAVA_LIBRARIES := com.google.android.maps.jar

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := Test

include $(BUILD_PACKAGE)
#===================================

What is wrong?
please help me..

-- 

2. Failed to upload .apk on device

Hi,
I have problem with uploading my .apk file on device Highscreen Zeus.
In emulator everything works fine, but when I can upload application
on the device, I always get following error:

[2010-08-12 14:41:25 - BitmapDrawing] Failed to upload
BitmapDrawing.apk on device 'ZUSM1M10A02691'
[2010-08-12 14:41:25 - BitmapDrawing] java.io.IOException: Unable to
upload file: Permission denied
[2010-08-12 14:41:25 - BitmapDrawing] Launch canceled!

Could somebody advise me, how to solve this problem?
Thanks a lot.

Lukas

-- 

3. What unit is used by Toast offset?

4. SQLiteDatabase.update() super slow

5. Prevent Rotation/change of orientation in a certain tab/activity

6. does AppWidgetManager.updateAppWidget() need to be called on the UI thread?

7. ListActivity - detecting which view clicked on