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 horizontal-align flag set???
On Monday, April 9, 2012 9:33:52 AM UTC+5:30, jason zhu wrote: > Both of them are set to "android:layout_centerHorizontal="true"" > > 在 2012年4月9日 上午11:56,Put_tiMe <[email protected]>写道: > >> 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 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 > > > -- 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

