You can use a lambda expressions and pass the view in as a parameter.
android:onClick="@{() -> callback.onCategoryClick(viewModel)}"
If you need the view, you can pass that as well with:
android:onClick="@{(view) -> callback.onCategoryClick(view, viewModel)}"