@Bindable
protected ItemClickPresenter mPresenter;
protected PartialListItemBinding(DataBindingComponent _bindingComponent, View _root,
int _localFieldCount, ImageView imageView) {
//调用父类的构造方法
super(_bindingComponent, _root, _localFieldCount);
this.imageView = imageView;
}
//…
}
调用了父类ViewDataBinding的构造方法,并传入了三个参数,这里看第三个参数_localFieldCount,它代表xml中存在几个ObservableField形式的数据,继续追踪.
protected ViewDataBinding(DataBindingComponent bindingComponent, View root, int localFieldCount) {
this.mBindingComponent = bindingComponent;
//考点1
this.mLocalFieldObservers = new ViewDataBinding.WeakListener[localFieldCount];
this.mRoot = root;
if (Looper.myLooper() == null) {
throw new IllegalStateException(“Dat