[Android SDK] A little clarification when using JakeWharton’s ButterKnife

Inside your Activity, respect this order:

TextView injectedTextView;

protected void onCreate(Bundle savedInstanceState){

Method ButterKnife.inject(context) must be called after setContentView(…), or else you won’t be able to use injectedView.

Thanks JakeWharton for the excellent lib!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s