hoanglam10499 / react-native-drop-shadow

https://www.npmjs.com/package/react-native-drop-shadow
MIT License
229 stars 9 forks source link

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

Open borra27 opened 11 months ago

borra27 commented 11 months ago
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>

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?