Setting Weight in Java code

Discussion in 'Application Development' started by StevenTNorris, May 14, 2010.

  1. StevenTNorris

    StevenTNorris New Member
    5

    May 14, 2010
    2
    0
    5
    I have created a view that extends a LinearLayout and added a few children for it (mostly textViews). I want to set the weight (and possibly other attributes) of these children, but do not know how to do this unless I use xml.

    Is there a way to set the weight in java code?

    or

    Is there a way to set the children of the linearlayout in my class using xml?
     

    Advertisement

Share This Page

Loading...