Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 在react native中重画listView_React Native - Fatal编程技术网

React native 在react native中重画listView

React native 在react native中重画listView,react-native,React Native,我想将css更改为图像旋转木马插件中的选定项,但我的更改没有反映出来,因此我想刷新react native中的listView组件 <ListView initialListSize={10} onLayout={this.handlePreviewLayout} dataSource={this.props.dataSource} renderRow={this.renderImagePreview}

我想将css更改为图像旋转木马插件中的选定项,但我的更改没有反映出来,因此我想刷新react native中的listView组件

<ListView
          initialListSize={10}
          onLayout={this.handlePreviewLayout}
          dataSource={this.props.dataSource}
          renderRow={this.renderImagePreview}
          onScroll={this.handleScrollRev}
          horizontal={true}
          scrollEnabled={true}
          ref={(comp) => { this._refPreviewListView = comp; return; }}
        />    
<View>
        <Image
          style={[
            styles.previewImage,
            previewImageStyle,
            { width: previewImageSize, height: previewImageSize },
            { borderRadius: this.state.borderRad }
          ]}
          source={getImageSourceFromDataSource(row)}
          resizeMode="cover">
        </Image>
        <View style={[styles.onlineStatus, { backgroundColor: this.badgeStatus }]} >
        </View>
      </View>
{this.\u refPreviewListView=comp;return;}
/>    

首先,我们需要看一些代码来帮助您。其次,要刷新listView,您需要删除/重新创建其内容。分享你的代码,这样我们就可以帮助你的例子。嘿@Facundo La Rocca谢谢你这么快回复我,在我的问题中,我已经添加了我的代码,请看一下。首先,我们需要看一些代码来帮助你。其次,要刷新listView,您需要删除/重新创建其内容。分享你的代码,这样我们就可以帮助你提供示例。嘿@Facundo La Rocca感谢你这么快回复我,在我的问题中,我已经添加了我的代码,请查看。