ListActivity does the ArrayAdapter<T> class have to be an Inner Class

by David Parry » Fri, 23 Apr 2010 08:03:42 GMT

Sponsored Links

I have a Concrete class that implements ListActivity in this class I
have an InnerClass extends ArrayAdapter<T>. This came from an example
and works great i.e. displays my list of items on the screen.

The problem is that I tried pulling out the InnerClass and use it as a
standalone Concrete class. So now I pass in the array of Items i.e T[]
to the constructor but when I set the ListActivity classes
setListAdapter(my pulled out InnerClass); the screen comes up empty?

So is this by design that ArrayAdapter has to be an InnerClass in the
ListActivity class?

If no then how can i get the list to display and update.

Thank you,


Other Threads

1. looking for implementation of IAlarmManager


I am interested in the scheduling done by the
AlarmManager.setInexactRepeating method and so I started looking for
the implementation but I haven't been able to find anything.
Internally to AlarmManager, I can see that the actual work is being
done by an interface.  After googling around
for a bit there seems to reference to an implementing class called but that is as far I get.

As sort of an offhand guess it seems that an instance of IAlarmManager
might implemented as native code and somehow becomes available to the
application at runtime.

I am working in eclipse with the 1.6 Android source code.



2. How to correctly use / fill an ImageView?


I want to show an image file in an ImageView widget.

iv.setImageURI(Uri.fromFile(new File("filepath...")));

does not work (getting INFO/System.out(1624): resolveUri failed on bad
bitmap uri: file:///sdcard/test/photos/photo13.jpg) I tried the

BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inSampleSize = 4;
if(mBitmap != null) {

But the samplesize is static. So small pictures (like icons and so on)
are blurry. If I don't set a samplesize, the picture might get too big
(for example photos).

So how to do that?


3. Developer Survey on Carrier Network APIs

4. Layout and minsdkversion issue

5. Pinwheel or progress indicator while loading screen

6. Android alarm manager

7. converting short array to byte array help