From ca65d97d603f0308c18bbee835b7cf6d5f76e232 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Thu, 15 Jun 2023 15:23:40 -0700 Subject: [PATCH] fix: foreground ripple crash on api < 23 (#37901) Summary: The Pressable component supports the `foreground` option for ripple. However, using it on old android api levels (e.g. android 5) crashes with ``` Error while updating property nativeForegroundAndroid' of a view managed by: RCTView null No virtual method setForeground(Landroid/ graphics/drawable/Drawable;)V in class Lcom/ facebook/react/views/view/ReactViewGroup; or its super classes ``` TouchableNativeFeedback.js has a check to make sure this does not happen [as seen here](https://github.com/facebook/react-native/blob/b0485bed0945061becace5af924fa60b17ab295f/packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js#L158) I also want to point out that this PR can be closed https://github.com/facebook/react-native/pull/30466 as it's already implemented ## Changelog: