Dealing with clicks from ActionItems in a QuickAction Dialog
<p>I have a QuickAction dialog <a href="http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/" rel="nofollow">like this</a> and would like instead of dealing with each ActionItem click with anonymous listeners
<br><code>
final ActionItem chart = new ActionItem();<br>
chart.setOnClickListener(new OnClickListener() {<br>
@Override<br>
public void onClick(View v) {<br>
Toast.makeText(TestQuickAction.this, "Chart selected" , Toast.LENGTH_SHORT).show();<br>
}<br>
});
</code><br>
I want to have just 1 onClick method in my class (to deal with all ActionItems) by implementing OnClickListener and onClick(View v). </p>

<p><code>myclass implements View.OnClickListener{<br><br>
public void onClick(View v){<br>
//detect which ActionItem caused onClick...<br>
}<br>
}</code></p>

<p>The problem is that even though selecting one of these ActionItems invokes onClick, an ActionItem isn't a View, it doesn't extend anything. How can I tell which ActionItem caused the click?</p>
