Re: [android-developers] Re: Dynamically adding view in layout xml in android

2012-04-04 Thread Bilal Haider
You can try something like this. View mainlayout = (ScrollView) findViewById(R.id.ScrollView1); LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view = (View) inflater.inflate(R.layout.main, null);

[android-developers] Re: Dynamically adding view in layout xml in android

2011-02-15 Thread CrazzyAndroidians
yes, you can do it, using LayoutInflater and addView() Androidian On Feb 15, 3:13 pm, Deepak Kumar deepak.kumar...@gmail.com wrote: Hi All,               I have created a xml layout which includes ImageButtons in row,col format.So,layout having some initial number of views.Now,I want to

Re: [android-developers] Re: Dynamically adding view in layout xml in android

2011-02-15 Thread Deepak Kumar
Yeah, I am able to do that.But I don't find the related method for properties like- android:layout_toRightOf ,android:layout_above. Now this view that I am going to add is present inside RelativeLayout.So,those properties I have to set for this extra view to get adjust with