Yes, it's possible.
First you need to create the new views to be added: either from code
with "new TextView" or whatever, or by using LayoutInflater to create a
view hierarchy defined within XML.
The second step is adding them to the parent: get a reference to a
ViewGroup that you would like those views to go into, and call
viewGroup.addView(yourNewView).
For the second step, you most probably need to set LayoutParams for the
new view, so it's properly sized and positioned.
-- Kostya
15.02.2011 13:13, Deepak Kumar пишет:
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
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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