ButterKnife is an open source that eases the way to bind view in activity class. Below is the example: 1. In build gradle, compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 2. Suppose there are two buttons having id - android :id= "@+id/hiBtn" android :id= "@+id/byeBtn" 3. In activity .java class, a. Initialize your binding button variable as- @BindView (R.id. hiBtn ) Button hiBtn ; @BindView (R.id. byeBtn ) Button bye Btn ; b. For Activity class, in onCreate() method, ButterKnife. bind ( this ); For Fragment class, in onCreateView() method View view = inflater.inflate(R.layout.fancy_fragment, container, false ); ButterKnife.bind( this , view); c. And the button click event as, ...