Using React native 0.26,
My component is something like this
const Search = () => {
return (
<View style={styles.backgroundImage}>
<TextInput style={styles.textInput} onChangeText={(text) => console.log(text)} placeholder={"Enter Search Term"}/>
</View>
)
}
And my styles :
const styles = StyleSheet.create({
backgroundImage: {
flex : 1,
flexDirection: "column",
justifyContent: 'center',
alignItems: 'center'
},
textInput: {
justifyContent: "center",
alignItems: "stretch",
borderRightWidth: 30,
borderLeftWidth: 30,
height: 50,
borderColor: "#FFFFFF",
}
})
The problems that I am facing are
- The border right width and left width do not seem to have any effect and the placeholder text just begins on the left edge.
- The background of TextInput is "grey" its the same as the View's background. I was expecting it to be white by default, (Feels transparent).
- With iOS simulator how to bring up the keyboard, I would like to set
returnKeyType
and see how the keyboard looks (and have some code ononSubmitEditing
and test).