简体   繁体   English

反应本机列表视图节标题不在列表顶部吗?

[英]React Native List View Section Header not on top of list?

It seems that the section header of a list view does not stick at the very top of the list view, but rather about 20 pixels lower. 列表视图的节标题似乎并不停留在列表视图的最顶部,而是低了大约20个像素。 When you scroll the list it looks very ugly that the rows scroll up higher than the sticky section header. 滚动列表时,行向上滚动到高于粘性部分标题,这看起来非常丑陋。

Is there a fix, a workaround or anything I can do to fix that? 是否有修复程序,解决方法或我可以做的任何事情来解决此问题?

Thank you 谢谢

OK, turns out there is a property that will fix the additional offset on the top of the ListView component: 好的,事实证明,有一个属性可以修复ListView组件顶部的其他偏移量:

automaticallyAdjustContentInsets={false}

From what I understand the Content Insets is part a few components to offset the existance of the navigator at the top. 据我了解,内容插入部分是一些组件,以抵消顶部导航器的存在。 But in many cases that offset is just not wanted. 但是在许多情况下,根本不需要补偿。

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

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