Emre A. Yavuz wrote:
> Hi all,
> 
> Does somebody know how to handle a specific layout (say LinearLayout),
> which was given in a XML layout file, previously set in the Activity
> class using a SetContentView () method  ?
>  
> I am trying to add an image (probably as a child) to a previously set
> layout.

Step #1: Use findViewById() to get the layout you want to modify,
casting it to the appropriate type.

Step #2: Call addView() on that layout with the widget you wish to add,
specifying the appropriate type of LayoutParams (e.g.,
LinearLayout.LayoutParams, RelativeLayout.LayoutParams).

Step #3: There is no step #3.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~---------~--~----~------------~-------~--~----~
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