Существует несколько возможных решений
Решение 1
В теге include
укажите android:layout_width="match_parent"
и android_height="wrap_content"
<include layout="@layout/content_main"
android:layout_width="match_parent"
android_height="wrap_content"
/>
Решение 2
Используя LinearLayout
в качестве родителя ViewGroup
, укажите android:layout_weight="1"
и android:layout_height="0dp"
в теге include
, это позволит content_main.xml
занимают оставшееся место и все же помещаются на экране.
<include layout="@layout/content_main"
android:layout_width="match_parent"
android_height="0dp"
android_layout_weight="1"
/>