Does the gravity setting set by the parent override all layout_gravity settings set by its children? It seems to when I try it. Is there a way to bypass this behaviour? I would like to use a LinearLayout with a global gravity, but I want one element to be aligned to the bottom always.
I don't want a RelativeLayout.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:id="@+id/textview_error_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/button_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="@string/button_next" />
</LinearLayout>