Skip to content

TextInput in Android strange behavior #18182

Closed
@gekamikh

Description

@gekamikh

I have some troubles with text input on Android. I have TextInput with the long default value. This Input placed inside View component with some width. Here the problem: On ios cutting text inside TextInput looks like:
2018-03-03 08 00 56

  • It shows the beginning of the value and cut the end of the value.

But on Android it strange:
2018-03-03 07 59 26

  • it cuts the beginning of the value and shows only end.

How can I make Android behavior same as IOS? Or it's specific Android behavior?

Thank You!

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.4.0
Yarn: Not Found
npm: 4.6.1
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0

Component code

`
import React from 'react';
import { StyleSheet, Text, View, TextInput } from 'react-native';

export default class App extends React.Component {
render() {
return (


<TextInput
style={styles.textInput}
value={'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'}
underlineColorAndroid={'transparent'}
/>


);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
textInputContainer: {
width: 200
},
textInput: {
width: 200,
borderWidth: 1,
padding: 5
}
});
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: For Stack OverflowA question for Stack Overflow. Applying this label will cause issue to be closed.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions