Hot questions for Using Butter Knife in user interface


I have been looking online and I have seen so many different examples of how to use butterknife for implementing onClick . I would just like someone to show my the simplest way of doing it from a beginners perspective.


Frank next time please show us an example of what you have tried so that we can guide you in the right direction.

below is a simple example and a link for you

step 1 .

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

step 2. (in your onCreate)

//must match the ID in your view

step 3. implement the onClick

   void onRegisterClicked()
     //do whatever you need to do when the button is clicked 
      Intent intent = new Intent(this, RegisterActivity.class);


also have a look at this link for a better insight on how butterknife works.