onClickListener using Butterknife
<p><strong>onClickListener using Butterknife is bit confusing</strong></p>

<p>Say, I have a Whatsapp button which onClick opens Whatsapp to share something. By conventional means, the code for onClickListener would be something like</p>

<pre><code>ImageButton buttonWhatsapp = (ImageButton) findViewById(R.id.whatsapp);

buttonWhatsapp.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
optionsShareThis.whatsApp(ActivityWebView.this, ShareThisURL);
    }
});
</code></pre>

<p>where, <code>optionsShareThis</code> is an object of <code>OptionsShareThis</code> class and <code>whatsApp(Context context, String Url)</code> is a method defined in this class.</p>

<p>I am confused with how to define onClick event using Butterknife. I tried using</p>

<p><code>@Bind(R.id.whatsapp) ImageButton ButtonWhatsapp;</code> to bind the View</p>

<p>Then the below code for onClick event</p>

<pre><code>@OnClick(R.id.whatsapp) void onClick() {
    optionsShareThis.whatsApp(this, ShareThisURL);
}
</code></pre>

<p>Android Studio says the field <code>ButtonWhatsapp</code> and the method <code>onClick()</code> <em>is never used</em>. What's happening?</p>

<p><strong>EDIT:</strong>  I have already added <code>Butterknife.bind(this)</code> inside <code>onCreate()</code>. Sorry, I didn't mention this earlier</p>