View view = View.inflate(context, R.layout.news_item_pager, null);
ButterKnife.bind(this, view);
View rollView = View.inflate(context, R.layout.layout_roll_view, null);
ButterKnife.bind(this,rollView);
Why does it report an error when written like this? How does butterknife bind multiple views?
歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~
When multiple Views are bound to the same class, the annotation processor will look for the id name corresponding to the binding reference in each View. If it cannot find it, an error will be reported.
It is recommended not to bind multiple Views in the same class. You can bind them in inner classes