react-native-onboarding-swiper icon indicating copy to clipboard operation
react-native-onboarding-swiper copied to clipboard

Grey background strip on round iPhone displays

Open t-kaufmann opened this issue 4 years ago • 3 comments

On iPhones with a round display, the bottom of the Onboarding Swiper stays grey. Neither changing the default color of the app-theme nor setting bottomBarColor={"white"} do change that.

image

t-kaufmann avatar Oct 11 '21 20:10 t-kaufmann

What happens when you set bottomBarHighlight to false?

jfilter avatar Jan 31 '22 00:01 jfilter

This component uses a SafeAreaView for rendering its contents.

You can encapsulate your Onboarding component with another View to set the color in the bottom stripe which is kept as a distance from the SafeAreaView.

Example:

// Flex to let the container grow over full screen.
<View style={{flex: 1, backgroundColor: 'white'}}>
      <Onboarding
        // color of bottom tab controls container
        bottomBarColor='white'
        // for other colors you should set bottomBarHighlight this to false
        // otherwise the color will be applied with [0.1 opacity](https://github.com/jfilter/react-native-onboarding-swiper/blob/d732783681fae546deb5c97b73cde918cbb45644/src/index.js#L314)
        bottomBarHighlight={false}
       ...
       />
</View>

ASchwad avatar Aug 08 '22 11:08 ASchwad

@jfilter I hadn't read the whole thread, so I fumbled with the bottom bar-related props, and setting bottomBarHighlight to false indeed did the trick!

bhubr avatar Sep 12 '22 18:09 bhubr