2016-12-05 4 views
0

説明プルは、Android

IはリストビューでrefreshControlを使用する場合、ヘッダはPICとして、誤り位置で示すためにエラーを示しますリストビューではなく、listerviewのヘッダ。 listviewがすべてのデータソースをレンダリングするとき、リストビューがすべてのデータソースプルを描画してuiを上に示すように表示しないときに、UIを更新するためにプルするのは正常です。

ネイティブUIコンポーネント でUI参照をリフレッシュするにはプルしますが、ScrollViewで同じrefreshcontrolは問題ありません。

追加情報

はネイティブバージョンに反応:[0.33] プラットフォーム:[アンドロイド]

答えて

0

@舒文颉

<ListView 
        initialListSize={5} 
        pageSize={10} 
        showsVerticalScrollIndicator={false} 
        dataSource={data} 
        renderRow={this._renderRow.bind(this)} 
        onEndReached={this._onEndReached.bind(this)} 
        onEndReachedThreshold={10} 
        enableEmptySections={true} 
        onScroll={this._onScroll.bind(this)} 
        renderFooter={this._renderFooter.bind(this)} 
        ref={ (listView) => {this.listView = listView;} } 
        refreshing={this.props.articleListRedecuer.isRefreshing} 
        onRefresh={() => this._onRefresh()} 
        renderScrollComponent={(props) => (<ScrollView {...props} />)} 
1

私はあなたがrefreshControl

<ListView 
 
     dataSource={this.state.dataSource.cloneWithRows(data)} 
 
     renderRow={this.renderItems.bind(this)} 
 
     renderFooter={this.renderFooter.bind(this)} 
 
     onEndReached={() => this._onEndReached()} 
 
     onEndReachedThreshold={10} 
 
     onScroll={() => this._onScroll()} 
 
     refreshControl={ 
 
      <RefreshControl 
 
      style={{ backgroundColor: 'transparent' }} 
 
      refreshing={goods.isRefreshing} 
 
      onRefresh={() => this._onRefresh()} 
 
      title="Loading..." 
 
      colors={['#ffaa66cc', '#ff00ddff', '#ffffbb33', '#ffff4444']} 
 
      /> 
 
     } 
 
     />
属性使用することをお勧め

+0

私はrefreshControlの代わりにrenderScrollComponent = {(props)=>()を使用しています。同じrefreshControlを使用して、pulltorefresh listview headerのdefalutヘッダーを変更する必要があります。 scrollviewは問題ありません。 –

関連する問題