Butterknife is a light weight library to inject views into Android components. It uses annotation processing.
The @BindView annotation allow to inject views and performs the cast to the correct type for you. The @@OnClick(R.id.yourid) annotation allows to add OnClickListener to a view. You can optional define the method parameter of the view in case you want it injected.
Butterknife includes also findById methods which simplify code that still has to find views on a View, Activity, or Dialog. It uses generics to infer the return type and automatically performs the cast.
Salient run – down of how to integrate Butterknife annotation library to help your code and makes you write less repetitive commands
Get source here:
Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe