Setting layout options for include tags in Android

penguin linguist

So in Android layouts, if you want to include an external layout and set things like android:layout_below or android:layout_alignLeft, be sure to set BOTH the width and height, otherwise the layout options will be ignored.

<include
    layout="@layout/footer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/someotherstuff"/>

Source

View original post

Publicités
Par défaut