Hi, did you try to : > give an ID to your layout > find it with the findViewById method > then you can add your view.
Rgds,, C. On May 4, 11:28 am, "rjy...@gmail.com" <rjy...@gmail.com> wrote: > Hi > I create a application and the main activity reference by the > main.xml. > The main.xml has a LinearLayout element. So my code is setContentView > (R.layout.main) to show the main window.I need add other element such > as Button or EditView, but I don't want add the XML line to the > main.xml.I hope use the layout.addView(...) to add the elements to my > Activity. So I need get the current LinearLayout object and can invoke > the addView function. > So How can I get the default layout? > Thanks. > -------------------- > RongJun Ying --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---