If you would like to pass an argument into the method like an @IdRes
you can use
XML:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="<package_name>.R" />
</data>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:load_image="@{R.drawable.image}" />
</layout>
Code
@BindingAdapter("load_image")
public static void loadImage(ImageView view, @IdRes int imageId) {
//Logic
}