[android-developers] add a linear layout on click of button

2010-11-12 Thread RKJ (Android developer)
Hi all, I want to add a full layout on click of button, i did in below way... I want when i press the R.id.phone_more_botton button, then entire LinearLayout android:id=@+id/add_contact_phone (button + EditText) will added, if i click again again add then entire layout. addContact.java

Re: [android-developers] add a linear layout on click of button

2010-11-12 Thread Stephen Jungels
findViewById requires that you have already inflated the xml view (with setContentView, for example). To load a view defined in xml dynamically you want to use a layout inflater of some kind: http://developer.android.com/reference/android/view/LayoutInflater.html Or you could also just change

Re: [android-developers] add a linear layout on click of button

2010-11-12 Thread Rocky
thax dear, let me work on that On Fri, Nov 12, 2010 at 6:11 PM, Stephen Jungels sjung...@gmail.com wrote: findViewById requires that you have already inflated the xml view (with setContentView, for example). To load a view defined in xml dynamically you want to use a layout inflater of