Android ScrollView, how to save a component on the screen when scrolling up to the screen?

I have a ScrollView layout like this:

<ScrollView> 
    <Component1>
    <Component2>
    <Component3>
    <Component4>
    ...
</ScrollView>

Inside ScrollView, I have some components, each of which can be something like LinearLayout, RelativeLayout, TableRow, ... Now I want to scroll the view, when it <Component2>reaches the top of the screen, it will be stored on the screen, and <Component3>, <Component4>... will continue scrolling to the end of the page. When I scroll down, it <Component2>will scroll only when everyone <Component3>becomes visible. I saw this in the Iphone app and wondered how to achieve this on Android.

I don’t know if I am describing enough, but it’s the same as this video

http://www.youtube.com/watch?v=jXCrM1rzLZY&feature=player_detailpage#t=71s

, . , 1:36 , , .

- , Android?

+5
1

, Component2 RelativeLayout, setVisible (true), Component2 (Android ), ScrollView. Component2 ScrollView (.getTop()), Component2Copy.setVisible(false).

. .

+3

All Articles