You should add the android:layout_width and android:layout_height attributes in the include tag. Otherwise, the margins are not taken into consideration.
However, if you want to override layout attributes using the
<include>tag, you must override bothandroid:layout_heightandandroid:layout_widthin order for other layout attributes to take effect.
https://developer.android.com/training/improving-layouts/reusing-layouts.html#Include