If you definitely don't want to use a LinearLayout
then an elegant solution might be to create a TextView
with 0 width and height as a marker of the centre point and use it to position your other View
s around it. For example;
<TextView
android:id="@+id/centre_marker"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerHorizontal="true"/>
Because this has 0 width (if you want a space between your EditText
s, you can either give this marker a width, or use margins on your other View
s), it will be more or less exactly in the centre. So you can align all components on the left of it to it's right side, and all on the right to it's left. For example;
<EditText
android:id="@+id/etFirstName"
style="@style/addressBookLand"
android:hint="Enter your first name"
android:inputType="text"
android:layout_below="@id/tvTitle"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/centre_marker"/>
<EditText
android:id="@+id/etLastName"
style="@style/addressBookLand"
android:hint="Enter your last name"
android:inputType="text"
android:layout_below="@id/tvTitle"
android:layout_toRightOf="@id/centre_marker"/>
Alternatively, as others have mentioned, two equal sized vertical LinearLayouts
inside a horizontal LinearLayout
would get you the results you need as long as you don't plan on making the layout any more complicated or less regimented.
I hope this helps. If you need clarification, you can just leave me a comment and I will explain as best as I can.