4

I want to have ScrollView Inside a Fragment that contains a TabHost as you can see from the screen-shot it's composed by two sections:

  • Header: in my case it's an image, I want this section to scroll
  • TabHost: contains three Fragments one of them is a ListView

What I have tried ?

I tried to create a scroll view and a list view inside the TabHost, everything is fine for the two first tabs, but in the third one which is a ListView, the items are not displayed.

After some research, I figured out that we can't have a ListView inside a ScrollView.

So what is the best approach to create a view like described here is a screen-shot of what I want to create:

Screen-shot of ListView inside a ScrollView

  • 1
    Maybe this could help: http://stackoverflow.com/questions/4523609/grid-of-images-inside-scrollview/4536955#4536955 – Zoltan Ersek Jun 29 '15 at 14:12

1 Answers1

1

In fact there's a way to implement ListView in ScrollView. But with this solution, ListView acts like a LinearLayout in memory.

btw: I used it before and working nice, saves the day.

Community
  • 1
  • 1
asozcan
  • 1,370
  • 1
  • 17
  • 24