Setting Weight in Java code


Last Updated:

  1. StevenTNorris

    StevenTNorris New Member This Topic's Starter

    Joined:
    May 14, 2010
    Messages:
    2
    Likes Received:
    0
    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...