• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Eclipse : Link a layer in XML and then to the activity Help

Lomo133

Lurker
Hey everyone!

I am pretty new to programming with Eclipse and i'm currently developing a game
and then I got stuck with a problem.

I link the relative layout to the XML game and assign it a ID, and then how do I add it to the activty ? :confused: Is there a command to do so it appears in the activity or something?

This maybe sounded very weird but if there is someone with a clue about this I would GREATLY apperciate it. If someone feels very kind and is experianced I could give more information if needed.

// Lomo ;)
 
Yes I already have that,

It's like this
setContentView(R.layout.game);

Because the XML's name is Game.

But the problem is that when i Assign a ID to the relativ layout I dont know how I can link it below the setContentView(R.layout.game);

Is there a command to link it in the activity?
 
when you set the contentview, its attaches the whole xml to your activity.

what exaclty are you trying to do?
 
It is suppose to happen something under the setContentView(R.layout.game); In the activity when I Assign the ID in the XML, but nothing happens??

I don't even know if it will happen automaticly or if I have to press some buttons because nothing happens? It wont happen something under the setContentView(R.layout.game);
and It's so hard to explain more. :(
 
Is people not able to help now? Because suddenly now nobody writes something, If you need more information I can try to do that but I need to know what you need help with :( Please community try to help me :(((
 
Back
Top Bottom