It's 2016, and unfortunately this is still not possible with RelativeLayout itself...
There are two attributes: *layout_centerVertical* & *layout_centerHorizontal*, but they take boolean value, and center view in its parrent. I wish they could take ID of another child... W dniu poniedziałek, 9 kwietnia 2012 05:56:56 UTC+2 użytkownik Put_tiMe napisał: > > 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/3e46f4d4-ac70-48ca-ab1a-627bd5cdf296%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

