1

I have a 'page' that has a number of components on it, and who's content is longer than the height of the device. one of the component is view pager. Content of view pager is also very large. How can i combine vertical scroll view of parent layout and view pager layout.My laytout is as follows:

few components

view pager-(large content in another layout)

few more component

i want to combine scroll view of view pager and parent layout

user2504840
  • 103
  • 6
  • u want to view pager inside scroll view????? – GB_Bhayani ツ Jul 17 '14 at 12:16
  • 1
    i'm not sure what you are trying to do, do you want a listview inside a viewpager? then try the `ListFragment` – mapodev Jul 17 '14 at 12:19
  • i have some more components out side view pager. so i need scroll view for contnts inside view pager and out side of view pager. i have given heiht of view pager as wrap content..but it shows only one line content. ineed to scrollinside view pager – user2504840 Jul 17 '14 at 12:20
  • i mean i need to show full content of view pager then that static content of page.. user should feel only one scroll view – user2504840 Jul 17 '14 at 12:21
  • try to height of view pager like "20dp" or as per ur requirment – GB_Bhayani ツ Jul 17 '14 at 12:22
  • If i have give like 20 dp.. i will get 2 scrolling.. inside view pager and out side view pager..but i need only one scrolling – user2504840 Jul 17 '14 at 12:26

1 Answers1

0

It should just work. See here -> ViewPager inside a ScrollView does not scroll correclty

You structure should be like this:

ScrollView
-ViewPager
--ScrollView

Then just apply the suggestions made in the linked post above.

Also make sure the ViewPager has a fixed height! Otherwise the ScrollView inside the ViewPager won't work without writing a custom ScrollView or ViewPager.

Community
  • 1
  • 1
Julian Pieles
  • 3,880
  • 2
  • 23
  • 33