How to setContentView for A View Object?

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

How to setContentView for A View Object?

Postby sommeralex » Wed Apr 09, 2008 7:14 am

Hello all,

I would like to create my own view with XML. But how can i set it then?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. class myClass extends View(){
  3.  
  4.  
  5.  
  6. this.setContentView(R.layout.myLayoutView) // doesnt work..
  7.  
  8.  
  9.  
  10. }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


i mean, it works for activities, but not for views.. whats the appropriate method for it?

thx
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Return to Other Coding-Problems

Who is online

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