tags:

views:

104

answers:

2

Hi, Seeking help to design a layout as shown here:

http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185MTd0eGdyZmc&hl=en

The major challenge I face is aligning the components at desired positions. Please refer the three buttons(icons) and the way they are positioned.

Literally, going nuts, thinking how to position those exactly at the desired places.

Any help is much appreciated.

Regards, Rony

A: 

Since you used the Android category, I'm assuming that you're trying to recreate this iPhone layout in Android.

The three buttons would probably be best laid as follows.

Your main layout container would probably be a RelativeLayout, so you can dock things to the top and bottom and lay everything else out in relation to one of its sibling elements. The three button icons (and I'm assuming you're referring to the circular buttons and not the tab bar buttons at the very bottom) would be in a LinearLayout centered within its parent (probably want to use gravity=center_horizontal on the main outer layout) and the individual items would have an equal left and right margin parameters to get the desired spacing (layout_marginLeft, layout_marginRight). You could also make the LinearLayout container of the buttons flush (layout_width=fill_parent) and using android:weight attribute on the outer buttons laying them out towards the center and using a lower weight on the center item. I'd favor the first option, personally.

If you're trying to create relatively complex layouts and any of the above doesn't make sense, go back and read the docs. Layout in Android is very powerful, but you really have to understand the available tools to take advantage of it.

Rich
Hi Rich,Extremely thankful for this wonderful guideline. It worked and more than that I am happy, I learned the concept a bit.Jim Blackler,Thanks for your response too.Regards,Rony
Anees
A: 

Any help in this regard is appreciated.

Rony

Rony