I need XML for creating layouts in my Android apps and what I wanted to know is the following. Can I implement some logic in XML? For instance, I wanted to position my text exactly "(fill\_parent - (the width of the image))/2"... something like this.