Return an integer from OnClickListener to outside the function (Android, Java)
<p>So hey guys I want to return an integer to outside my OnClickListener function:</p>

<pre><code> hello.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            int choice = 1;
        }
    });

if (choice == 1) {
    //Do stuff here
}
</code></pre>

<p>Sorry for this newbie question, but I've got no idea how to solve this... Thanks</p>
