简体   繁体   English

Android-到达scrollview的顶部后,滚动的一部分不应隐藏

[英]Android - Part of the scroll should not hide after reaching the top of the scrollview

I have a scroll view in which it has an image at the beginning of the scroll and then a text field and finally a list of images. 我有一个滚动视图,其中在滚动的开始处有一个图像,然后是一个文本字段,最后是一个图像列表。 What I want is that when i scroll the view the image section should get scrolled but when it reaches the text field, the text field should not get scrolled up rather it should stay like its the header and the list below it should still get scrolled. 我想要的是,当我滚动视图时,图像部分应该被滚动,但是当它到达文本字段时,该文本字段不应被向上滚动,而应像标题一样保持其滚动,并且其下方的列表仍应滚动。

Please suggest me a way to accomplish this design. 请建议我一种完成此设计的方法。

与其以滚动方式获取整个布局,不如先获取图像,然后获取标题textview然后获取listview,并在listview行的其他布局文件中获取imageview并显示列表。

What you want is, the image should be scrolled first and when it reaches to textfield the header should be stick at that place. 您想要的是,应该首先滚动图像,当它到达文本字段时,标题应该粘贴在该位置。

Refer this https://android-arsenal.com/details/1/266 . 请参阅此https://android-arsenal.com/details/1/266

Hope this solves your problem 希望这能解决您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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