You don't need to set the weightSum. If you don't specify it, Android
will simply use the sum of the declared weights. For instance using
weights 0.5 and 0.5 is exactly the same as using weights 37 and 37.

On Thu, Jun 2, 2011 at 12:06 PM, Chris <[email protected]> wrote:
> Assign your layout a weightSum (like 1, its arbitrary) then divide up the
> children as needed using layout_weight.  The example below draws the two
> children views vertically with each taking up half the parent:
>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
>     android:layout_gravity="fill"
>     android:layout_height="fill_parent"
>     android:layout_width="fill_parent"
>     android:weightSum="1.0"
>     android:orientation="vertical"
>     android:padding="5dp">
>
> <TopChildView android:layout_height="0dp"
>     android:layout_weight="0.5"
>     .../>
>
> <BottomChildView android:layout_height="0dp"
>     android:layout_weight="0.5"
>     .../>
>
> --
> 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



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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