ListActivity acting weird

Put your problem here if it does not fit any of the other categories.

ListActivity acting weird

Postby Noobay » Sat Jul 10, 2010 5:34 pm

hi, I've tried to write some ListActivity activities, and no matter
how I write it or even if I directly copy it from a website like the
SDK-refernce's it won't work...

I manage to run a ListView if I create a ListView object and
instantiate it, and for some reason, running it from a class extending
ListActivity won't work and just freeze after it loads and installs
successfully to the emulator device.


This is the simplest snippet I could make, and it just won't run(freezes on load and bring up debug panel)>,>
(including main and manifest XMLs)

http://pastebin.com/ujNSpHhW

Thank you in advance.
Noobay
Freshman
Freshman
 
Posts: 3
Joined: Sat Jul 10, 2010 5:22 pm

Top

Re: ListActivity acting weird

Postby Noobay » Sat Jul 10, 2010 11:20 pm

Apprently for the SDK ver 1.5 I must use android:id = "@android:id/list" as the id for the ListView object :|
didn't know that and even the official docs didn't say that (or I missed it?) anyway, if anyone bumps into this problem again, just change the ID of the ListView item the Activity's layout XML file and you're set.
Noobay
Freshman
Freshman
 
Posts: 3
Joined: Sat Jul 10, 2010 5:22 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests