2

I am trying to use parallel scrolling in android.i.e.i have two view in a layout a mapview on the top and a listview in the bottom.when i scroll up in the listview, the mapview should also scrollup.as we keep scrolling the list should cover the whole screen. i have tried getting the cordinates of the listview using the ViewTreeObserver.onGlobalLayoutListenerand

moving the listview on touch,which is not working out. can i get any suggestions on how to proceed.

Edit: I managed to get desired effect using parallaxScrollview. But how do i make the backGround image clickable in parallaxscrollview

shreyas
  • 2,166
  • 3
  • 18
  • 30
  • You mean like expanding the map by pushing the ListView outside of the screen like Foursquare app or the new Maps app? – MariusBudin Sep 21 '13 at 14:34
  • when the user scrolls up while scrolling the listview should take over the screen while the map goes out of the top edge of the screen. – shreyas Sep 21 '13 at 15:00
  • I have tried using parallaxscrollview. but it takes scrollview as child how do i do it with a list view – shreyas Sep 23 '13 at 08:23
  • Please lookout this . http://stackoverflow.com/questions/12342419/android-scrolling-2-listviews-together – Lalit Jadav Oct 20 '16 at 04:22

1 Answers1

0

You'll have to register for the onTouch of the listView and dynamically change the position and the size of the two components with every variation on the Y axis

MariusBudin
  • 1,277
  • 1
  • 10
  • 21