Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get child views of a ViewGroup in Android?

I have to get child views of WebView. For some text manipulations, I wonder if there is a way to set attributes of child views, for example:

View[] childs = webView.getChilds;
View ch = childs[0];
ch.setText("manipulated text");
like image 883
Hossein POURAKBAR Avatar asked Dec 06 '25 19:12

Hossein POURAKBAR


1 Answers

WebView has methods getChildCount() and getChildAt(int index). You can try to use these methods, but better solution is Bixi's one.

like image 105
Agata Avatar answered Dec 08 '25 10:12

Agata



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!