-1

I am trying to appy shadow to my text in the android app using react native but i am not able to see the shadow at all. This is my code:

const styles = StyleSheet.create({
viewStyle:{
    backgroundColor:'pink',
    justifyContent:'center',
    alignItems:'center',
    height:60,
},
textStyle:{
    fontSize:20
},
shadow:{shadowColor:'black',
    shadowOffset:{width:10,height:10},
    shadowOpacity:0.2
}

});

Khushi
  • 11
  • 4

1 Answers1

0

if you are using Android everything is normal.

These are properties that only apply to iOS:

  • shadowOffset;
  • shadowOpacity;
  • shadowRadius.

To manage the shadow on Android you have to use the elevation parameter.

Here you can find more detailed answers: How to set shadows in React Native for android?