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
 Question:

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,
David

--



Other Threads

1. Read a HTML file with Java methods

Hello developers,

I'm french, so I'm sorry for my english.
I would like to develope an application whose extracts some numbers
from a web site

In JAVA, I read the HTML file with this method :
-------------------------------------------------------------------------------------------------------
public static String get(String adresse) {
                String toreturn = null;
                try {
                        URL url = new URL(adresse);
                        URLConnection uc = url.openConnection();
                        InputStream in = uc.getInputStream();
                        int c = in.read();
                        StringBuilder build = new StringBuilder();
                        while (c != -1) {
                                build.append((char) c);
                                c = in.read();
                        }
                        toreturn = build.toString();
                } catch (MalformedURLException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        e.printStackTrace();
                }
                return toreturn;
        }
-------------------------------------------------------------------------------------------------------

But it doesn't work in ANDROID.
the method return nothing.

thanks for your help.

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

2. Build Android LDP Failed

Hi all,

i try to build android for omap ldp zoom1(labrador)

i'm using command like that ,

#repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git
#repo sync
# export ANDROID_JAVA_HOME=$JAVA_HOME
# cd ~/mydroid
#cp vendor/ti/ldp1/buildspec.mk.default buildspec.mk
# make -j2
build/core/main.mk:458: *** No TARGET_CPU_ABI defined by board config: Stop

any idea?

best regards,
Aldyth M

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Starting an Activity (with the dialog theme) from the onCreate() of another Activity results in a black screen.

4. android-x86 port for MID: how to enable Locale & Text setting

5. Signing apps

6. How to scroll Gallery all the way to the left?

7. Can a native application use java methods in TelephonyManager using getSystemService()