How to modify a class's data tag inside onClickListener?
<p>Please help me with this, i never ever understanded how things work inside onClickListener, so:</p>

<p>Got my own class:</p>

<pre><code>public class ItemFrame extends LinearLayout{

     int item_id;

     public ItemFrame(Context context){
        super(context);
     }

     public int getItem_id() {
        return item_id;
     }

    public void setItem_id(int item_id) {
        this.item_id = item_id;
     }
}
</code></pre>

<p>I initalize one and add an onClickListener:</p>

<pre><code>ItemFrame myItemFrame = new ItemFrame(this);

myItemFrame.setOnClickListener(new OnClickListener(){
                public void onClick(View v){

                                   //ERROR HERE:
                                   //Cannot refer to a non-final variable myItemFrame inside an inner class 
                                   //defined in a different method
                                   //Quick fix: Change modifier of 'myItemFrame' to final.
                    myItemFrame.setItemId(100);
                }


            });
</code></pre>

<p>So... My question is:
How can i set a data tag of my class, inside the onClickListener???
If i change it to final as Eclipse says, i cant modify it since it is <strong>final</strong>. 
Does it make any sense ?</p>
