Attaching A Fixed, Transparent, Header To A Listview?
Solution 1:
I would make a FrameLayout... and put your ListView in it first, filling the screen. Then put a TextView on top of that. To get the desired behavior at the top, maybe have a blank element at position 0 of the list, or just make the top padding of list item 0 have the height of your header...
Does that make sense? The ListView should scroll underneath the TextView in a FrameLayout.
Solution 2:
You can use a RelativeLayout for that, so you can get the Z axis using some properties;)
Update:
For example using a RelativeLayout:
RelativeLayout ----ListView ----TransparentHeader
Will appear in the way you show on your image.
As a comment :Android put layout elements in the order that they are defined on your xml, so, widgets at the bottom of the layout will be at the top.
Post a Comment for "Attaching A Fixed, Transparent, Header To A Listview?"