Say I have dynamically generated some amount of LinearLayout, all with different tags.
for (int i = 0; i <= 5; i++)
{
final LinearLayout LinLayBtn
Have you tried it this way and found a problem with it?
You'll need to make this line
LinearLayout LinLayBtn = (LinearLayout)findViewWithTag("1");
match the naming scheme you used when you set the tag. So you'd want something like this in your example:
LinearLayout LinLayBtn = (LinearLayout)findViewWithTag("id1");
If you need to do many of these lookups though it would probably be a better approach to store the view references in an array while you are creating them so you don't have to have all of the findView calls. Or do like @Muhammad suggested and use parent.getChild(index i);