Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Button button = (Button) findViewById(R.id.button);
- @InjectView(R.id.button) Button mButton;
- button.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- // ...
- }
- });
- @OnClick(R.id.button)
- public void onButtonClick() {
- // ...
- }
- static class ViewHolder{
- @InjectView(R.id.image_in_item)
- ImageView image;
- @InjectView(R.id.textview_in_item)
- TextView text;
- public ViewHolder(View view){
- ButterKnife.inject(this, view);
- }
- }
Add Comment
Please, Sign In to add comment