参考 http://www.it165.net/pro/html/201404/12375.html
@Optional
@InjectView
@Optional
@onClick
1.
@Optional
@InjectView
(R.id.might_not_be_there) TextView mightNotBeThere;
2.
3.
@Optional
@OnClick
(R.id.maybe_missing)
void
onMaybeMissingClicked() {
4.
// TODO ...
5.
}
无需强转
TextView firstName = ButterKnife.findById(view, R.id.first_name);
时间: 2024-10-12 17:22:53