【问题标题】:React Native refreshControl showing before pulldownReact Native refreshControl 在下拉之前显示
【发布时间】:2016-08-03 14:12:25
【问题描述】:

我已经实现了运行良好的 RefreshControl 组件,除了当我的视图最初加载时,我看到另一个 Refresh 控件的一部分显示在 NEW GAME 按钮上方。一旦我下拉,我就会得到我的数据并且错误消失,直到我重新启动应用程序。其他一切都很好,但似乎是 'title'、'tintColor' 和 'titleColor' 道具导致了问题,因为没有它们就没有错误。

这是我的代码:

<RefreshControl
   refreshing={this.state.refreshing}
   onRefresh={this.onRefresh}
   title={I18n.t('coming')}
   tintColor="#dceafd"
   titleColor="#dceafd"
/>

【问题讨论】:

    标签: react-native uirefreshcontrol


    【解决方案1】:

    我认为只需添加 backgroundColor: 'transparent' :)

    【讨论】:

    • 我可以确认这是可行的。我的代码如下所示:refreshControl={&lt;RefreshControl style={{backgroundColor:'transparent'}} refreshing={this.state.loading} onRefresh={this.refreshItems}/&gt;}
    猜你喜欢
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 2021-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多