Browse - Programming Tips - How can I center two views?

Date: 2017mar8
OS: Android

Q.  How can I center two views?

A.  Give them both layout_weight=1.0 in the layout.
eg:

<LinearLayout> <TextView android:layout_weight="1.0"> <TextView android:layout_weight="1.0"> </LinearLayout>
Details omitted for clarity.