Solution:
If you had a linear layout with two children then change all the child color without know their id.
Code:
If you had a linear layout with two children then change all the child color without know their id.
Code:
for (int i = 0; i < yourlayout.getChildCount(); i++) {
View v = layout.getChildAt(i);
v.setBackgroundColor(/* color you want*/);
}
}
Comments
Post a Comment