Sticky Component inside scrollview

后端 未结 5 406
逝去的感伤
逝去的感伤 2021-01-30 11:03

I\'m trying to build a a sticky component like this app

http://www.screencapture.ru/file/E88F08Fc

Deals, Products, Events tabs/segmentControl are actually start

5条回答
  •  故里飘歌
    2021-01-30 11:57

    You could put all of your content inside a ScrollView, place the sticky header in there, then use a second ScrollView inside the main view for the rest of the content. Something like this:

    
        
            
                // Header content here
            
    
            
                // Scrollable content here
            
         
    
    

    Set the height for the second ScrollView so that it takes only a part of the available space, that way the header will stay visible at the top.

提交回复
热议问题