> I have the following layout which display 3 buttons on a row. how can
> i make it so that each button is evenly distributed across the row?
> Right now, they are all crowded in the center of the row.

I am not 100% certain how you are defining "evenly distributed across the
row".

One possibility is to use a RelativeLayout, anchoring the left button to
the left edge, the right button to the right edge, and centering the
middle button.

If, however, "evenly distributed across the row" means you want the four
dots in the following ASCII art to be the same size:

.A.B.C.

(where A, B, and C are your buttons)

then you could use four View "widgets" in your LinearLayout, positioned
where I have them indicated above, with android:layout_width="0px" and
android:layout_weight="1". That should size them equally, with whatever
space is left over after your four buttons. I think View "widgets" are
naturally transparent, though you could always set
android:visibility="false".

There may be other solutions as well -- these are what come to mind.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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