I have <.ImageView>enter code heres(icons) in my android layout xml file, which are encompassed by a <ScrollView>.
Eg.
<.ScrollView><br>
<.LinearLayout><br>
<.ImageView> ...<./ImageView><br>
<./LinearLayout><br>
<./ScrollView>
To this layout, i want to attach a fixed footer. Basically a small tab present on the bottom on the screen which stays even when I scroll to the all the way down or all the way to the top.
I tend to write up layouts like this with a
LinearLayoutas root element and weights on the children to dynamically allocate screen estate. It keeps the layout definition compact and doesn’t require defining extra ids.Using a
RelativeLayoutas root element, with theScrollViewpositioned ‘above’ the bottom-aligned footer, however, is probably slightly better in terms of performance, although I doubt it’ll make a noticable different in the case of a simple view hierarchy like this. The RelativeLayout approach does require assigning some ids (to at least the footer, I’d say).