This should be an easy answer if you know android well. I am designing an app that requires implementing a Google MapFragment. I want to have an area of text below it inside a scrollview as shown below. However, I want to give the text the effect of scrolling up OVER the map (very similar to the android play store effect found here.
To implement this I decided to make the scrollview start at the top of the map and simply put an invisible spacer over the map to give the appearance that the text starts below. By putting the map view behind the scrollview, the touch event is of course 'stolen' (so I can't move the map around, zoom in etc.). My thought was that there might be a way to let the spacer's touch events bleed through the ScrollView and be intercepted by the map view. Is this possible? Or is there a better way I should implement this?
My code goes something like this:
<!-- This will be the map (dynamically loaded in) -->
<fragment
...
android:layout_height="200dp"
android:id="@+id/map"
android:layout_below="@+id/searchBox"
...
/>
<!-- Note: starts under searchBox, just like @+id/map does -->
<ScrollView
...
android:layout_below="@+id/searchBox"
...
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- This is the spacer. Covers the map so that the content can be positioned under it (thus content is under the map as well) -->
<View
android:layout_width="wrap_content"
android:layout_height="200dp"
android:id="@+id/mapSpacer"/>
... The actual text content goes here
</RelativeLayout>
</ScrollView>
I appreciate the answers. If anything is confusing please ask.