-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
BaseButton ripple covered by child <Image />
#544
Comments
You can use the absolute filling as a workaround, wrap button and image in a view and style button with absolute fill, btw I have to specify rippleColor too or I get some weird behavior. |
This is why RN's The "absolute filling" workaround doesn't work for me, btw. |
<Image />
Wrap Ripple.js import React from 'react';
import { View, StyleSheet } from 'react-native';
import { RectButton } from 'react-native-gesture-handler';
const styles = StyleSheet.create({
box: {
position: 'relative',
},
ripple: {
position: 'absolute',
left: 0,
top: 0,
width: '100%',
height: '100%',
zIndex: 1,
},
});
export default ({ style, children, ...props }) => {
return (
<View style={[style, styles.box]}>
{children}
<RectButton rippleColor="#888" style={styles.ripple} {...props} />
</View>
);
}; |
Hi! Adding |
Fixes #544. Some Android-only props were missing from `BaseButton` type: `rippleRadius`, `borderless` and `foreground`. This PR adds them.
Issue:
BaseButton
ripple works fine with Text as child, but not with Image.To reproduce:
Tested Device: Samsung Galaxy S6, Android 7.0
The text was updated successfully, but these errors were encountered: