Multiple view in a same activity

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Multiple view in a same activity

Postby base2coder » Sun Aug 02, 2009 11:12 am

Hi all, i am new in android... i want to show multiple views in a same activity without using the xml. i want to do it by coding in .java file. can anyone help me about the code??
base2coder
Junior Developer
Junior Developer
 
Posts: 14
Joined: Sun Jul 12, 2009 8:54 pm

Top

Postby Steren » Sun Aug 23, 2009 10:13 am

Hi,

I would not recommand doing this, but if you need it :

Basically you have to define in your code the layout in a ViewGroup (params have to be entered in ViewGroup.LayoutParams) that contains your Views

Then you attach this content to your activity by doing setContentView(myViewGroup);
Steren
Freshman
Freshman
 
Posts: 4
Joined: Sat Aug 22, 2009 6:10 pm

Postby base2coder » Sat Nov 07, 2009 7:54 am

THanks for the help..
base2coder
Junior Developer
Junior Developer
 
Posts: 14
Joined: Sun Jul 12, 2009 8:54 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests