Hai我在android中遇到键盘问题,当我想在文本输入中键入任何东西时它会在键盘上显示一些建议,我不想要那些建议,任何人都可以帮助我如何避免这些建议.

任何帮助非常感谢,上面的图片来自nexus 6.这是我的TextInput代码
<TextInput
style={styles.TextInput}
value={this.state.currentWord}
onChangeText={(text) => this.setState({currentWord:text.trim()})}
placeholder="Type Your word here"
autoCapitalize='characters'
autoCorrect={this.state.autoCorrect}
autoFocus={this.state.autoFocus}/>
Run Code Online (Sandbox Code Playgroud)
在状态中,我声明autoCorrect为false
刚才我开始使用AsyncStorage.我尝试存储输入文本值,如下所示:
class Sample extends React.Component{
constructor(props){
super(props);
this.state = {
Name:' ',
};
}
componentDidMount() {
AsyncStorage.getItem("Name").then((value) =>{
this.setState({"Name":value})
}).done();
handleChange(e){
AsyncStorage.setItem("Name", e.nativeEvent.text)
this.setState({
email: e.nativeEvent.text
})
}
render(){
return(
<View>
<TextInput
style={styles.textContainer}
value={this.state.Name}
placeholder="Name"
onChange={this.handleChange.bind(this)}/>
</View>
)
}
Run Code Online (Sandbox Code Playgroud)
为此它正常工作,但我想将记录添加到数组中,而不是每次都更改记录.我想将记录推送到一个数组中,需要在视图中显示总数组数据,(即)我还需要以前可用的数据.
我在我的TextInput中想要改变placeHolder字体的大小,我试过这样:
<TextInput
style={styles.email}
value={this.state.email}
placeholder="Email"
placeholderTextColor="red"
//placeholderTextSize = 20px
onChange={this.handleEmailChange.bind(this)}
onBlur={this.onBlur.bind(this)}/>
Run Code Online (Sandbox Code Playgroud)
当我写这样的颜色对我有用但尺寸不起作用,任何人都可以给我建议如何改变占位符文字的大小,任何帮助非常感谢
我在这一点上苦苦挣扎,如果在我的手机中,我的网络连接很差,有些我如何调用该服务,则需要更多时间来调用该服务
如何告诉用户您的互联网连接不良.
为了检查互联网连接,我使用了networkInfo,但它只对连接是否有帮助,但它没有提供有关网络速度的任何信息.
如果可能,任何人都可以给我一些建议,如何解决这个问题,任何帮助非常感谢我使用的是react-native版本:0.29.0
我刚开始使用电子.我怀疑如何在electron我npm start用来运行电子时传递命令行参数.
在Node.js我使用:node server.js one two=three four
命令提示符:
var arguments = process.argv.slice(2);
arguments.forEach(function(val,index, array) {
console.log(index + ': ' + val);
});
Run Code Online (Sandbox Code Playgroud)
在Node.js工作.我需要知道如何才能在电子工作中完成这项工作.
有人可以为此提供解决方案吗?
我正在使用react-native-pushnotification.这里是模块链接 https://github.com/zo0r/react-native-push-notification 在ios通知工作正常,在后台和前台也工作,但在android前台它工作正常,但在后台我收到通知,当点击该通知应用程序重新启动并且没有在android中显示任何警报时,
任何人都可以给我一些建议,如何解决它,任何帮助非常感谢.
在react-native我设计了一个样本,当我在不同的IOS设备中检查它时,这是我的代码:
render() {
return (
<View style={styles.container}>
<View style={styles.body}>
<TouchableHighlight style={styles.facebook} >
<View style={styles.row}>
<Image style={styles.icon} source={require('image!fb')}/>
<Text style={styles.facebookText} >Continue with Facebook</Text>
</View>
</TouchableHighlight>
</View>
</View>
)
}
};
var styles = StyleSheet.create({
container:{
marginTop: 65,
flexDirection:'column',
flex:1,
backgroundColor:'transparent'
},
body:{
flex:.5
},
facebook:{
marginTop: 25,
height: 50,
padding: 10,
marginRight: 40,
marginLeft: 40,
backgroundColor: '#1A8A29',
},
row:{
flexDirection:'row',
},
facebookText:{
marginLeft: 8,
fontSize: 20,
color: 'white',
alignSelf:'center'
},
icon:{
marginTop: 3,
marginLeft: 5,
width: 25,
height: 25
}
}) …Run Code Online (Sandbox Code Playgroud) native-side-menu这里是我的代码:
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
var React = require('react-native');
var SideMenu = require('react-native-side-menu');
var {
AppRegistry,
StyleSheet,
Text,
View,
Navigator,
} = React;
var ContentView = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
</View>
);
}
});
var TestView = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to another page.
</Text>
<Text style={styles.instructions}>
Testing react native side menu with navigator.
</Text>
</View>
); …Run Code Online (Sandbox Code Playgroud) Hai我试图显示警报消息,我尝试了不同的方式,如alert,AlertIOS,Alert.alert
Run Code Online (Sandbox Code Playgroud)Alert.alert('Alert', 'email is not valid, Please enter correct email', [{text: 'Ok'}]);
我收到这样的错误:
任何人都提出建议,如何在反应原生的Android和IOS中显示警报任何帮助非常感谢
我想在地图中移动某个位置时更改我的初始区域,为此我使用了 onRegionChangeComplete 功能,但它一次调用两次或三次。
这是我的代码:
onRegionChangeComplete(region) {
if(!this.state.initialRegionChange){
console.log("changeRegion:"+JSON.stringify(region))
var initialRegion = {
latitude: region.latitude,
longitude :region.longitude,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA
}
var lat = parseFloat(region.latitude)
var lang = parseFloat(region.longitude)
}else{
this.setState({
initialRegionChange:false
})
}
}
render(){
return(
<MapView
ref="map"
style={styles.map}
initialRegion={this.state.region}
provider={MapView.PROVIDER_DEFAULT}
zoomEnabled={true}
onRegionChangeComplete={this.onRegionChangeComplete.bind(this)}
pitchEnabled={true}
showsCompass={true}
showsBuildings={true}
showsUserLocation={true}
showsTraffic={true}
showsIndoors={true}
/>
)
}
Run Code Online (Sandbox Code Playgroud)
请给我建议如何解决这个问题。
非常感谢任何帮助。
这是我正在关注的模块链接。 https://github.com/react-community/react-native-maps
react-native react-native-android react-native-ios react-native-maps
react-native ×9
javascript ×2
electron ×1
node.js ×1
react-native-push-notification ×1
reactjs ×1