Skip to content

Commit 23cdb3c

Browse files
committed
fix: disable ripple effect on Android P
Ripple effect has a lot of issues on Android P facebook/react-native#6480 Let's disable it for now and figure out how to fix/workaround it
1 parent 79e1ef2 commit 23cdb3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/TouchableRipple.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { withTheme } from '../core/theming';
1313
import type { Theme } from '../types';
1414

1515
const ANDROID_VERSION_LOLLIPOP = 21;
16+
const ANDROID_VERSION_NOUGAT = 27;
1617

1718
type Props = React.ElementConfig<typeof TouchableWithoutFeedback> & {|
1819
/**
@@ -83,7 +84,9 @@ class TouchableRipple extends React.Component<Props, void> {
8384
* Whether ripple effect is supported.
8485
*/
8586
static supported =
86-
Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP;
87+
Platform.OS === 'android' &&
88+
Platform.Version >= ANDROID_VERSION_LOLLIPOP &&
89+
Platform.Version <= ANDROID_VERSION_NOUGAT;
8790

8891
render() {
8992
const {

0 commit comments

Comments
 (0)