Activities and ListActivities with button and lists

by MyGB » Fri, 23 Apr 2010 08:05:42 GMT

Sponsored Links
 Hi everyone,
It's the first time I post here, so I hope I'll be clear for my

I'm developing a real-time informations about train. The application
will connect to a XML plateform that will give the next trains with a
station given.
I'm a beginner in Android development, and I'm stuck to a class-
problem (I think...).

In details, the problem is, when I start the application, the user get
a screen with 2 buttons, one of them get the user to a new screen with
stations list. But, my problem is, I can't put buttons and lists in
the same class.
I explain, to get a list on the screen, I have to put :
"public class NextTrain extends ListActivity {"
but the buttons function doesn't work (the app crashs).
By the way, if I put
"public class NextTrain extends Activity {"
the buttons works but not the list (no crash, but the screen doesn't
display anything).

Can you help me ?
Thanks in advance.

The Java source file : 
The Main.xml file : 
The Stations.xml file : 


Other Threads

1. where can i modify ?

You mean I can't modify it? But how about add a item like that? I can't not
find the place to add this properly. Can you tell me? Thanks.

2009/3/13 Jean-Baptiste Queru <>


2. Merchant account signup down?

I am trying to sign up for a merchant account but it seems to be down:
"Sorry, we could not setup your merchant account.
Please try again later."

Can anyone else confirm this, or is it just my login?


3. Reg: Camera application

4. Testing Android Game on real device: please help

5. G1 Storage Space

6. Which countries sell G1s?

7. Real price of Android market transactions