Home > OS >  Background color overflowing out of border radius - React native
Background color overflowing out of border radius - React native

Time:05-20

enter image description here

applied background color getting overflow out of the border on android

 <CardView
                  style={{
                    borderWidth: 0.25,
                    borderColor: colors.secondary400,
                    backgroundColor: "red",
                    ...shadows.shadowDefault,
                    shadowOffset: item.shadowOffset,
                    shadowColor: item.shadowColor,
                    shadowOpacity: item.shadowOpacity,
                    shadowOpacity: 0.32,
                    shadowRadius: spacing.SCALE_05,
                    shadowColor: Colors.black,
                    overflow: "hidden",
                  }}
                >

CodePudding user response:

Try adding resize mode : 'contain' to your cardView style

CodePudding user response:

This is because of border-width Please remove border-width from this or provide in px it will fix your issue

  • Related