U can use id in xml, use findViewById method to find the layout in your activity, then add a new button in layout with code.
2010-02-04 王心锋 Senior Software Engineer/MDEV Creator Email: [email protected] Web: http://mdev.cc Community: http://mdev.cc/dev Project Wiki:http://mdev.cc/wiki Tel:0551-2341751 Mobile: +86.13485512230 Address: 7#602 ShuNanTingYuan, WangJiang Road,HeFei City,An Hui Province 发件人: chen ji 发送时间: 2010-02-04 11:12:42 收件人: Android Developers 抄送: 主题: [android-developers] How to add some button dynamicly aftersetContentView Hi All, I have use setContentView(R.layout.main) in the onCreate as using XML to set my whole layout. But now I need add some button dynamicly in the code so I think I need get the layout of the Activity again. So need I get the laytout of the activity again? If I am right, how to get it? Thanks very much' Ji -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

