title: Android AlertDialog button click
body: <p>I got an AlertDialog that has one positive and negative button each. Within the onClick(DialogInterface dialog, int item) event handler, which is a member function of Activity, how do I tell which button has been clicked? Base on my observation, the "item" parameter has -1 as value if positive button is clicked, or -2 if it's negative button. However, I couldn't find any information on such from API doc hence I feel that this could be broken at any time.</p>