How to get dynamically generated image name in android
<p>i want to get image name on click of image which is created dynamically...... </p>

<pre><code> for(int i=0;i&lt;list.size();i++)
    {
        final ImageButton b=new ImageButton(this);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(70, 70);
        layoutParams.setMargins(5, 5, 0, 0); // left, top, right, bottom
        b.setLayoutParams(layoutParams);
        Resources res = getResources();
        int resourceId = res.getIdentifier("_"+list.get(i).toString(), "drawable", getPackageName() );
        b.setImageResource( resourceId );
        b.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
              //at here i want to get the selected image name


            }
        });
        rowoptions.addView(b);
    }    
</code></pre>
