Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ripple is not working inside function call. #39

Open
Parameshvadivel opened this issue Dec 19, 2020 · 1 comment
Open

Ripple is not working inside function call. #39

Parameshvadivel opened this issue Dec 19, 2020 · 1 comment

Comments

@Parameshvadivel
Copy link

Parameshvadivel commented Dec 19, 2020

Here is my code.

      <View style={{ backgroundColor: 'blue', width: '100%', height: 900, top: 0 }}>
            {this.state.ImageViewVisible == false ?
                <View style={{ backgroundColor: 'yellow', top: 50, height: 180 }}>
                    <IconView>
                        <UploadIconSvg style={{ left: 120 }} />
                        <Text style={{ fontSize: 20, color: '#96A9C3', fontFamily: 'avenirBook', lineHeight: 28, textAlign: 'center', top: 10 }}>Upload your custom {'\n'}icon</Text>
                    </IconView>
                    <Ripple onPress={() => this._pickImage()} style={styles.Btn}>
                        <Text style={{ fontSize: 15, color: '#ffff', fontFamily: 'avenirMedium', textAlign: 'center' }}>Upload Icon</Text>
                    </Ripple>
                </View>

                :

                <View style={{ backgroundColor: 'red', top: 50, height: 180 }}>
                    <ImageView>
                        {image && <Img source={{ uri: image }} />}
                        <Ripple onPress={() => this.onRemoveImg()} rippleOpacity={0} style={styles.ImgClose}>
                            <Ionicons name="ios-close-circle" size={30} color="black" />
                        </Ripple>
                    </ImageView>

                    <Ripple onPress={() => console.log('tapped icon')} style={styles.Btn}>
                        <Text style={{ fontSize: 15, color: '#ffff', fontFamily: 'avenirMedium', textAlign: 'center' }}>Set Icon</Text>
                    </Ripple>
                </View>
            }
        </View>

Help much appreciated pls...

@khuongsatou
Copy link

You can use function below put onLongPress
const onLongPressHandle = () => {
if (typeof onLongPress === 'function') {
onLongPress();
} else {
onPress();
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants