Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29599

React-Native omits the last character

$
0
0

Whenever I put a string of more than 5 characters inside a element, the last one is not rendered. Here's my code and the outputted string.

const Header = () => {
    const { textStyles, viewStyles } = styles;

    return (
        <View style={viewStyles}>
            <Text style={textStyles}>Albums</Text>        
        </View>
    );
};

const styles = {
    viewStyles: {
        backgroundColor: '#F8F8F8',
        alignItems: 'center',
        justifyContent: 'center',
        height: 60,
        paddingTop: 15,
        shadowColor: '#000',
        shadowOffset: { width: 0, height: 2 },
        elevation: 2
    },
    textStyles: {
        fontSize: 20
    },
};

Outputted string: Album

If I change the string inside the Text element to something like 'Albums!', the output will be Albums. It always show n-1 characters.


Viewing all articles
Browse latest Browse all 29599

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>