I've seen exactly the same problem when adding a custom View object.
If added first, no other objects are given any space in the
LinearLayout regardless of weight.
If added after other objects, it works fine.

On May 31, 9:43 am, Anton Persson <[email protected]> wrote:
> Hello,
>
> I have a set of custom views that I would like to add to a LinearLayout
> object. However, the first object I add to the layout (I do this
> dynamically, during runtime) has a OnMeasure method that tries to get as
> much space as possible resulting in that it get's all the space LinearLayout
> object. This is correct behaviour, but when I then add more objects
> following that I want the allocated area for the first object to decrease so
> the others will fit.
>
> As it is now, each following object will get zero space, and hence won't be
> visible.
>
> Can this be solved somehow?
>
>    Best Regards
>     Anton

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