This is possible using only xml, thanks to the databinding library:
First wrap xxLayout.xml in a layout and add a databinding class definition that lists the variables you want to pass into the included layout.
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable name="myText" type="java.lang.String"/>
<variable name="mySrc" type="android.graphics.drawable.Drawable"/>
</data>
<LinearLayout>
<TextView android:text="@{myText}"/>
<ImageView android:src="https://stackoverflow.com/questions/36617322/@{mySrc}"/>
</LinearLayout>
</layout>
Then use the databinding library to inflate the including layout and inject the desired values using databinding statements. See the databinding library documentation for details on the databinding expression language and what it supports.
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout>
<include layout="xxLayout"
app:myText="@{`aaa`}"
app:mySrc="https://stackoverflow.com/questions/36617322/@{@drawable/bbb}"/>
<include layout="xxLayout"
app:myText="@{`ccc`}"
app:mySrc="@{@drawable/ddd}"/>
</LinearLayout>
</layout>