I have a dynamically generated array of textviews
for(int i = 0; i < blog_link_counter; i++) { textViewArray[i] = new TextView(this); textViewArray[i]
don't have to use R.id.xxx, simply use the same numbers that you used in your loop:
switch(v.getId()) { case 0: case 1: //etc }