2017-05-27 4 views
0

react-nativeアプリでレンダリング機能で返される次のコードがあります。 containerflexプロパティが1に設定されています。ネイティブスクロールビューにスクロールしないでください

コンテンツがオーバーフローしてもスクロールが機能しない場合でも、私は間違って何をしていますか?

またをScrollViewに設定してみました。まだ動作していません。

<View style={globalStyle.container}> 
      {flashMessage} 
      <ScrollView> 
      <View style={globalStyle.header}> 
       <Text style={globalStyle.title}> {localization.categories} </Text> 
      </View> 
      <ListView style={{marginTop: 10}} 
       dataSource={this.state.dataSource} 
       renderRow={(rowData, sectionID, rowID)=> this.renderRow(rowData, sectionID, rowID)} 
      /> 
      </ScrollView> 
      <View style={{position: 'absolute', height: 70, left: 0, right: 0, bottom: 0, flexDirection:'row', justifyContent:'center'}}> 
      <TouchableHighlight style={globalStyle.footer} onPress={() => { this.redirect('home'); }} > 
       <View> 
       <Image style={globalStyle.footerIcons} source={require('./Thumbnails/ -button-selected.png')}/> 
       <Text style={globalStyle.footerText,globalStyle.selected} > {localization.meditate} </Text> 
       </View> 
      </TouchableHighlight> 
      <TouchableHighlight style={globalStyle.footer} onPress={() => { this.redirect('profile');}} > 
       <View> 
       <Image style={globalStyle.footerIcons} source={require('./Thumbnails/user.png')} /> 
       <Text style={globalStyle.footerText} > {localization.me} </Text> 
       </View> 
      </TouchableHighlight> 
      <TouchableHighlight style={globalStyle.footer} onPress={() => { this.redirect('settings');}}> 
       <View> 
       <Image style={globalStyle.footerIcons} source={require('./Thumbnails/settings.png')} /> 
       <Text style={globalStyle.footerText} > {localization.settings} </Text> 
       </View> 
      </TouchableHighlight> 
      </View> 
     </View> 

答えて

1

私はScrollView内でListViewを使用しないでください。あなたはrenderHeader機能を使用して そこにあなたのヘッダーを置くことができ :

<View style={globalStyle.header}> 
    <Text style={globalStyle.title}> {localization.categories} </Text> 
</View> 
関連する問題