简体   繁体   中英

how to make a header position fixed while scrolling down

Within a NestedScrollView how do you make every Header stay at a specific point while scrolling down in this case right under the Image until another Header comes by while scrolling down which pushes the first Header and gets replaced by the 2nd Header and so on. I hope the image makes sense to what I am trying to accomplish. Thank You!

在此处输入图片说明

If you want to achieve this you should not use NestedScrollView instead use a linear layout with Image at the top then a listview with sticky header. I think this will solve your problem

Here is the link for the list you want. https://github.com/emilsjolander/StickyListHeaders

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM