Android 使用DataBinding时 databinding 无法链接到布局id,不出现提示解决办法
·
在平时使用databinding的时候 无法链接到布局文件中id 的方法
1、在相对应的xml布局文件中增加 data约束
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#1C1F2A">
<data>
</data>
// 下面是正式的布局约束
</layout>
更多推荐



所有评论(0)