0

enter image description here

as shown in above image, header is the alpha image and my grid view start from below the header but when user scroll that grid view up, grid view must scroll behind the header and when scroll grid view down and reaches at top than grid view first item should be visible at bottom of header.. any idea to do this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mayur R. Amipara
  • 1,223
  • 1
  • 11
  • 32

4 Answers4

0

Use relative layout as base, add header and gridview wrapped in scrollview to it.

user4182277
  • 950
  • 1
  • 6
  • 13
0

Add your gridview in a scrollview it will work. And also try keeping the header in relative layout if the previous one is not working.

DroidAks
  • 327
  • 2
  • 9
0

There are several custom controls made to be able to have header for a gridview, similar to a listview. Take a look at the links below:

Add a Header to a GridView (Android)

Android GridView add header and footer like listview

Community
  • 1
  • 1
A B
  • 338
  • 3
  • 10
0

You can add empty header in your gridView with same height as your transparent header. Here is the link of library you can use for adding header to your gridView : https://github.com/liaohuqiu/android-GridViewWithHeaderAndFooter

Nauman Afzaal
  • 1,046
  • 12
  • 20