hi, I am new in android I have created 2 classes.first extends activity and 2nd extends View. I want to add buttons,image Views etc. into the second class....... how can I do this.....please help...........
                
                A: 
                
                
              Take a look at inflate in the View class, this allows you to inflate an arbitrary XML-file which is then added to a specific ViewGroup:
http://developer.android.com/reference/android/view/View.html#inflate(android.content.Context, int, android.view.ViewGroup)
Usage:
View.inflate(context, R.id.my_layout_file, myViewGroup);
                  TuomasR
                   2010-09-29 06:43:15
                
              can you provide a simple example. I will be greatful to you.please.
                  antony
                   2010-09-29 10:46:00
                See here: http://stackoverflow.com/questions/3820401/how-to-load-an-xml-inside-a-view-in-android/3820640#3820640
                  TuomasR
                   2010-09-29 10:52:35