为什么我的TextInput文本在React Native中滚动?

时间:2018-08-23 12:53:43

标签: react-native react-native-android

我想知道为什么我的文字在滚动。无论如何,有没有停止在该区域滚动?我在其中使用TextInput。

<View 
   style={{
     width:Dimensions.get('window').width,
     height:60,backgroundColor:"#4f9cdf",
     padding:10,
     flexDirection:'column'}}>

      <View style={{
          flexDirection:'row',
          borderRadius: 20,
          backgroundColor:'#376f9b',
          height:40}}>
             <TouchableOpacity style={{paddingLeft:10}}>
                 <Image source={require('./assets/image/ico_search.png')} resizeMode='contain' style={{height:20,width:20}}/></TouchableOpacity>
                 <TextInput style={{width:Dimensions.get('window').width-77,fontSize:width/24,color:'#aec0d2',fontFamily:'Montserrat',textAlign:'center',justifyContent:'center'}} placeholderTextColor="#aec0d2" placeholder='what are you looking for today?' underlineColorAndroid='transparent'
                 scrollEnabled= "false"></TextInput>
             <TouchableOpacity style={{paddingRight:10}}><Image source=require('./assets/image/go.png')}  style={{height:20,width:22}} numberOfLines={1} /></TouchableOpacity>
     </View>
</View>

0 个答案:

没有答案