You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to align center using the textAlign, but nothing happens. So, I tried 'right' and 'left' and still not working.
I'd like to keep the container aligned center and the textInput with the same behavior inside.
import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import Constants from 'expo-constants';
// You can import from local files
import AssetExample from './components/AssetExample';
// or any pure javascript modules available in npm
import { Card, TextInput } from 'react-native-paper';
export default function App() {
return (
<View style={styles.container}>
<TextInput textAlign={'right'} style={{padding:10, borderBottomWidth:2, borderColor:'#369', textAlign:'center'}} placeholder={'Senha'} secureTextEntry={true} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
paddingTop: Constants.statusBarHeight,
backgroundColor: '#ecf0f1',
padding: 8,
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
},
});
What have you tried
I tried to workaround styling with some ViewProps, using flexDirection row and justify and alignItens center, but the input hide the 2 first caracteres, only in ios, and only when number digited was the number 1. But I didn't like this behavior.
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.
Current behaviour
The style textAlign is not working.
Expected behaviour
I tried to align center using the textAlign, but nothing happens. So, I tried 'right' and 'left' and still not working.
I'd like to keep the container aligned center and the textInput with the same behavior inside.
Code sample
https://snack.expo.io/@humbertocruz/rude-peach
What have you tried
I tried to workaround styling with some ViewProps, using flexDirection row and justify and alignItens center, but the input hide the 2 first caracteres, only in ios, and only when number digited was the number 1. But I didn't like this behavior.
Your Environment
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native": "0.62",
"react-native-paper": "^4.2.0",
"react-native-vector-icons": "^6.6.0",
node: 12.20.0
npm: 6.14.8
yarn: 1.22.5
"expo": "^38.0.9"
The text was updated successfully, but these errors were encountered: