Re: [android-developers] Relative layout : how to horizontally center align 2 children.

2012-04-09 Thread Put_tiMe
My layout is a little bit complex. I think centerHorizontal centers it w.r.t the parent. But my UI elements parent is the layout itself. And I did try centerHorizontal on the 2 UI child elements that I want to center align, and it didn't work. Maybe because those controls already have a

Re: [android-developers] Relative layout : how to horizontally center align 2 children.

2012-04-09 Thread Justin Anderson
I think centerHorizontal centers it w.r.t the parent. How does that matter? If both items are centered horizontally with respect to the parent and they have the same parent, they would, by definition, be centered horizontally with respect to themselves. But my UI elements parent is the layout

[android-developers] Relative layout : how to horizontally center align 2 children.

2012-04-08 Thread Put_tiMe
In a relative layout, how do I center align two *child* elements. The two elements could be of different widths. They appear one below the other and are horizontally center aligned. -- You received this message because you are subscribed to the Google Groups Android Developers group. To

Re: [android-developers] Relative layout : how to horizontally center align 2 children.

2012-04-08 Thread Jason Zhu
Both of them are set to android:layout_centerHorizontal=true 在 2012年4月9日 上午11:56,Put_tiMe putt...@gmail.com写道: In a relative layout, how do I center align two *child* elements. The two elements could be of different widths. They appear one below the other and are horizontally center aligned.