Added possibility to specify header and footer layout in xml