How to add scrollable title to gridview in android?

I am trying to add a scrollable title to the gridview layout in android, Ive tried everything I could find on the Internet, but I can’t get it working, this type of layout appears in a number of popular applications like facebook and instram, but Im could not find one example code that would give me an Idea on how to actually do this, does anyone know how this can be achieved? adding gridview to scrollview doesn't work either, below are some photos that illustrate what Im trying to achieve.

This is before the scroll:

before scroll

This is after the scroll: after scroll

+8
android android-layout android-gridview android-scrollview
source share
1 answer

Do not use gridview. Instead, use a listview that has this header function. And in the getView () method of your adapter, you will need to return a list item divided by the number of columns you need.

+13
source share

All Articles