Skip to content

Commit

Permalink
fix: restore compatibility with react-native <0.68 (software-mansion#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DrOverbuild committed Oct 7, 2022
1 parent f49728d commit ded734c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android/src/main/java/com/horcrux/svg/SvgViewManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
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;

Expand Down Expand Up @@ -174,7 +175,8 @@ public void setPointerEvents(SvgView view, @Nullable String pointerEventsStr) {
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();
Expand Down

0 comments on commit ded734c

Please sign in to comment.