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

React Native Crop Image inside of the square

$
0
0

how do I get the picture inside of the square :

Client :

RM: *the white square is located at the fourthLine (<View ref={view => { this.feedPost = view; }} style={[styles.grid]}>) *

<View style={[{flex: 40}, styles.maskFrame]} ></View><View style={{ flexDirection: 'row', width: '100%' }}><View style={styles.marginViewStyle}></View><View ref={view => { this.feedPost = view; }} style={[styles.grid]}></View><View style={styles.marginViewStyle}></View></View><View style={[styles.footer, styles.maskFrame]}><IconButton name="cross" onPress={goBack} /><TouchableOpacity onPress={this.snapPhoto.bind(this)} ><View style={styles.snapButton}><View style={[styles.innerSnapButton, { backgroundColor: theme.palette.primary }]}><Icon color="white" name="camera" /></View></View></TouchableOpacity><IconButton name="flash" onPress={toggleFlash} /></View>

CSS :

    marginViewStyle: {
        backgroundColor: 'rgba(1,1,1,0.6)',
        height: ( width - (StyleGuide.spacing.small * 2) ) * 2 / 3,
        width: '5%',
    },
    grid: {
        alignItems: 'center',
    //    justifyContent: 'space-around',
        top: 0,
        left: 0,
        borderColor: StyleGuide.palette.white,
        borderWidth: 4,
    //    marginLeft: StyleGuide.spacing.small,
        width: '90%',
        height: ( width - (StyleGuide.spacing.small * 2) ) * 2 / 3,
        borderRadius: 5,
    },

enter image description here


Viewing all articles
Browse latest Browse all 29452

Trending Articles



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