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);
                    TextView textview1 = (TextView)
view.findViewById(R.id.textview1);
                    EditText editview1 = (EditText)
view.findViewById(R.id.editview1);
                    EditText editview2= (EditText)
view.findViewById(R.id.editview2);

On 2/15/11, CrazzyAndroidians <[email protected]> wrote:
>
> yes, you can do it,
> using LayoutInflater and addView()
>
>
> Androidian
>
> On Feb 15, 3:13 pm, Deepak Kumar <[email protected]> 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
>> add extra views at run time i.e through code.Is it possible? How to do it?
>>
>>  Thanks,
>
> --
> 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

Reply via email to