I've designed a RelativeLayout with children elements such as TextView and ImageView. What I want to do is to create a RelativeLayout object from my created RelativeLayout in XML, that way I can access to its children elements and modify them (change image from ImageView and change the text from TextView). How can I do this? It would be kind of like this.
RelativeLayout lay = new "myrelativelayout";
ImageView img = lay.children[0];
TextView txt = lay.children[1];
Thanks!
                        
XML:
Activity onCreate:
To change children use:
or: