2

I have an Android project that displays results, using a simple listview. What I need is to display an image at the top of listview as follows:

Before scrolling

After scrolling

Please note, the image on top, should be scrollable. Would you please help me. Thanks.

Farid Ala
  • 668
  • 1
  • 12
  • 30

2 Answers2

6

Use ListView.addHeaderView() to add a header view to the top of your ListView.

AdamK
  • 21,199
  • 5
  • 42
  • 58
2

List view has header and footer options. You can put your scrollable image view in one XML layout, inflate and use that as list view header.

You can get more info if you search for list view header. The quickest one I can get is

Android listview with header and footer buttons

Community
  • 1
  • 1
MSD
  • 2,627
  • 1
  • 18
  • 12