i know that it’s possible to declare a “dummy” element in an XML, for example a textView, and load it with the layoutInflater and mayb change the text of it.
So what i thought is, that it might be possible to build a set of dummy views in a xml file load it with the layoutInflater change texts, imageResources and then append it to a tableLayout for example.
Let’s say i have a TableRow and with an image and a text in it. Can i load this xml, change the text of the textView, change the imageResource of the image and then append this to a tableLayout?
Yes you can. After inflating you can cast the view to it’s type and or access children using parentView.findViewById(id). you can also dynamically add or remove from ViwGroup’s like TableLayout. When you are using ListViews you can read about the convertView. It’s an example of reusing views.