2016-05-25 14 views
1

我在列表中使用RefreshControl組件,該列表在半透明應用程序標題欄下滾動。如何偏移RefreshControl

我唯一的問題是RefreshControl出現在半透明標題下。我真正想要的是能夠抵消RefreshControl的y位置,以便它直接顯示在app-header-bar下面。

我試過使用各種樣式屬性(marginTop,paddingTop,translateY),但似乎沒有任何工作。

enter image description here

回答

2

根據IOS this

如果設置了contentInset頂部滾動型,RefreshControl從這一點開始。

在android中,您可以使用參數'progressViewOffset'來實現相同的值。

<RefreshControl 
     refreshing={this.state.isRefreshing} 
     onRefresh={this._onRefresh} 
     progressViewOffset={offset} 
     /> 

此功能將以反應原生版本0.27發佈。 Here是在android中添加支持的提交。