我遵循了官方Android开发者网站上有关自定义绑定适配器和图像加载的数据绑定文档: http://developer.android.com/tools/data-binding/guide.html
成功编译代码后,我得到一个警告:
Warning:Application namespace for attribute bind:imageUrl will be ignored.
我的代码如下:
@BindingAdapter({"bind:imageUrl"})
public static void loadImage(final ImageView imageView, String url) {
imageView.setImageResource(R.drawable.ic_launcher);
AppController.getUniversalImageLoaderInstance().displayImage(url, imageView);
}
为什么会产生这个警告?附有屏幕截图...![enter image description here](https://istack.dev59.com/tt5Fk.webp)
"bind:"
? - betorcs