xml=based  gallery generation