mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
Replaces PointerEvents.parsePointerEvents(pointerEventsStr) with PointerEvents.valueOf(pointerEventsStr.toUpperCase(Locale.US).replace("-", "_")). This is the implementation of the original method.
This commit is contained in:
@@ -21,6 +21,7 @@ import com.facebook.react.views.view.ReactViewGroup;
|
||||
import com.facebook.react.views.view.ReactViewManager;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Locale;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -174,7 +175,8 @@ class SvgViewManager extends ReactViewManager implements RNSVGSvgViewManagerInte
|
||||
if (superclass != null) {
|
||||
Method method = superclass.getDeclaredMethod("setPointerEvents", PointerEvents.class);
|
||||
method.setAccessible(true);
|
||||
method.invoke(view, PointerEvents.parsePointerEvents(pointerEventsStr));
|
||||
method.invoke(
|
||||
view, PointerEvents.valueOf(pointerEventsStr.toUpperCase(Locale.US).replace("-", "_")));
|
||||
}
|
||||
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user