You can surround your LinearLayout
with a RelativLayout
and slightly change the layout parameters on the LinearLayout
, something like below suggestion:
<RelativeLayout
xmlns:Android="..."
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
...
</LinearLayout>
</RelativeLayout>
This will ensure the internal relation between your buttons and text views are unchanged, since they are still wrapped by the LinearLayout
, which in turn isn't filling the screen any more, hence, it can be centered within its new parent; the RelativeLayout
.
Cheers