keshavkaul / react-native-sketch-view

A React Native component for touch based drawing supporting iOS and Android.
MIT License
99 stars 47 forks source link

Could not display the drawing result #11

Open refikanissa opened 7 years ago

refikanissa commented 7 years ago

I just followed the tutorial, but it couldn't display the result on Android all settings on gradle was done and my code on js just as same as the tutorial

` <View style={{flex: 1, flexDirection: 'column'}}> <SketchView style={{flex: 1, backgroundColor: 'white'}} ref="sketchRef" selectedTool={this.state.toolSelected} onSaveSketch={this.onSketchSave.bind(this)} localSourceImagePath={this.props.localSourceImagePath}/>

                        <View style={{ flexDirection: 'row', backgroundColor: '#EEE'}}>
                            <TouchableHighlight underlayColor={"#CCC"} style={{ flex: 1, alignItems: 'center', paddingVertical:20 }} onPress={() => { this.refs.sketchRef.clearSketch() }}>
                                <Text style={{color:'#888',fontWeight:'600'}}>CLEAR</Text>
                            </TouchableHighlight>
                            <TouchableHighlight underlayColor={"#CCC"} style={{ flex: 1, alignItems: 'center', paddingVertical:20, borderLeftWidth:1, borderRightWidth:1, borderColor:'#DDD' }} onPress={() => { this.refs.sketchRef.saveSketch() }}>
                                <Text style={{color:'#888',fontWeight:'600'}}>SAVE</Text>
                            </TouchableHighlight>
                            <TouchableHighlight underlayColor={"#CCC"} style={{ flex: 1, justifyContent:'center', alignItems: 'center', backgroundColor:this.isEraserToolSelected() ? "#CCC" : "rgba(0,0,0,0)" }} onPress={this.toolChangeClick.bind(this)}>
                                <Text style={{color:'#888',fontWeight:'600'}}>ERASER</Text>
                            </TouchableHighlight>
                        </View>
                    </View>

`