Scott,
One easy way I can think of is to stick a horizontal LinearLayout in the
Relative parent, and then give each button layout_width="0px" and
layout_weight="<some value, say, 1>".
If you would like buttons to be sized to text with empty space in
between, you can put empty View objects where needed, and set
layout_weight on those.
-- Kostya
14.02.2011 17:23, RLScott пишет:
I have a complex layout that is almost perfectly adapted to
RelativeLayout rules - all except for 2 buttons. I want to equally
space 5 ImageButtons along the bottom of the view. The outside two
buttons I can do in XML with android:layout_alignParentRight="true"
and android:layout_alignParentLeft="true". The middle button I can do
with android:layout_centerHorizontal="true". But how can I position
the remaining 2 buttons between the others? What I wanted to do was
to recalculate their position with respect to the other 3 buttons in
the onCreate() method using AbsoluteLayout. But I see that
AbsoluteLayout has been deprecated. I would rather not clone the
AbsoluteLayout functionality if there is a more straight-forward way
to do what I need.
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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