I have a pretty complex layout defined in xml file , now I want to add this layout as a view using addView or something else.
xml
addView
As layout is pret
If your view is a ViewGroup (layout) You can use InflaterService.inflate(id, ViewGroup) and set the ViewGroup, it will set the current child(s) with the content of your xml.
InflaterService.inflate(id, ViewGroup)