我已经在XML文件中自己的自定义类型的数据标记内创建了一个变量
<data>
<variable
name="gameViewModel"
type="com.example.andriod.splock.screens.game.GameViewModel" />
</data>
此类的变量具有将视图作为参数的方法choicemade(view : View)
我无法通过it
作为我的图像视图的参考
以下代码显示无法找到标识符方法
<imageView
...
android:onClick="@{() -> gameViewModel.choicemade(it)}"/>
如何传递图像视图的参考?
尝试这种方式