change current layout showing

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

change current layout showing

Postby YoFrankie » Mon Aug 03, 2009 4:58 pm

Hi,

i want to change my main xml layout by this code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. LinearLayout layout = (LinearLayout) this.findViewById(R.layout.main);
  3.  
  4. layout.addView(a view control);
  5.  
  6. setContentView(R.layout.main) or setContentView(layout);
  7.  
  8.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

but it just doesn't work, why?

Thank you in advance
YoFrankie
YoFrankie
Junior Developer
Junior Developer
 
Posts: 15
Joined: Mon Aug 03, 2009 4:52 pm

Top

Re: change current layout showing

Postby llt1214 » Tue Aug 11, 2009 9:16 am

FIRST LINE OF CODE IS NOT RIGHT
llt1214
Freshman
Freshman
 
Posts: 5
Joined: Tue May 05, 2009 2:50 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests