react-native-drop-shadow icon indicating copy to clipboard operation
react-native-drop-shadow copied to clipboard

It doesn't work properly when the shadows twice on Android

Open borra27 opened this issue 2 years ago • 0 comments

  • "react-native": "0.70.9",
  • "react-native-drop-shadow": "^1.0.0",
import DropShadow from "react-native-drop-shadow";

    <DropShadow
       style={{
            shadowColor: colors.red,
            shadowOffset: {
              width: -15,
              height: 0,
            },
            shadowOpacity: 1,
            shadowRadius: 3,
          }}
        >
          <DropShadow
            style={{
              shadowColor: colors.yellow,
              shadowOffset: {
                width: 0,
                height: -30,
              },
              shadowOpacity: 1,
              shadowRadius: 3,
            }}
          >
            <Image
              style={{ width: 40, height: 40 }}
              source={images.hightArrow}
            />
          </DropShadow>
      </DropShadow>
  • iOS image image

  • Android image image

If you double shadows on Android, it doesn't look like iOS.

For iOS The first shadow is a blue image with a red shadow 1, The second shadow is a blue image with a yellow shadow, and the corresponding yellow shadow has a red shadow 2.

A line is visible above the blue arrow image and no red shadow 2 is drawn.

I think the red shadow 2 is outside the area of the red shadow 1.

What can I do to make Android look the same as iOS?

borra27 avatar Dec 15 '23 03:12 borra27