I have View. How to get and edit children inside View.
View myTable = inflater.inflate(R.layout.letters_table, container);
// Get and edit myTable children
I have View. How to get and edit children inside View.
View myTable = inflater.inflate(R.layout.letters_table, container);
// Get and edit myTable children
Not all View
s have children. Only ViewGroup
instances have. If you want to get the children of an inflated View
try this:
if (view instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) view;
for(int i = 0; i< viewGroup.getChildCount(); ++i) {
View child = viewGroup.getChildAt(i);
// Edit the child
}
}