I am trying to add a complex / nontrivial header to a ListView (and a slightly less complex footer) that should scroll along with the rest of the content.
The header consists of
- Bold TextView with black transparent background and rounded corners.
- TextView with plain text, black transparent background
- Imageview
- click button (actually ImageView with onClick) and delimiter
I am familiar with addHeaderView, but if I try to add a complex view (consisting of LinearLayout with several children), I see only the first child of the complex title in the list as a title.
In addition, the design breaks down (because the title may be transparent, the ListView itself is missing. Perhaps this can be solved by adding more styles to the ListView itself and its entries (which should not be transparent), but I get the impression that I just achieve the limits of listviews.
Can this be done? Does anyone know of any applications (or better, code examples) that have a similar complex title? All the other examples I could find are trivial headers: buttons, text images or images (online and on SO) with hardly any interesting style.
android styling listview header
Ivo van der Wijk
source share