Getting source information from a programatically created OnClickListener
<p>I'm writing an android application that programatically  populates a LinearLayout with several Views that contain TextViews. Additionally, I'm adding OnClickListeners to each of the above views such that I can retreive the Strings those TextViews contained within when clicked. The ClickListeners are working, as I'm hitting that method when running through the debugger, but Im not sure how to access the data for the specific view it is being called from. Here's a code snippet to clarfy:</p>

<pre><code>LinearLayout list = (LinearLayout)findViewById(R.id.whatever);

for(int i = 0; i &lt; sourceArrayList.size(); i++)
{
    View customTextView = View.inflate(this, R.layout.custom_text_view.xml, null);
    TextView tv1 = (TextView)customTextView.findViewById(R.id.tv1);
    tv1.setText("This is the value I would like to retrieve");
    TextView tv2 = (TextView)customTextView.findViewById(R.id.tv2);    
    tv2.setText("I would also like to get this value");

    customTextView.setOnClickListener(new OnClickListener()
    {
        public void onClick(View arg0) 
        {
            Toast.makeText(getBaseContext(), "You clicked: x", Toast.LENGTH_SHORT).show();
        }

    });

    list.addView(customTextView);
}
</code></pre>

<p>So, any guidance on how to grab the values of those textViews within that onClick() method would be much appreciated.</p>
