React Native SafeAreaView background color - How to assign two different background color for top and bottom of the screen?

前端 未结 6 1957
小鲜肉
小鲜肉 2021-01-30 03:15

I\'m using SafeAreaView from React Native 0.50.1 and it\'s working pretty good except for the one part. I assigned the orange background color to the SafrAreaView

6条回答
  •  萌比男神i
    2021-01-30 03:54

    I was able to solve this using a version of Yoshiki's and Zach Schneider's answers. Notice how you set the top SafeAreaView's flex:0 so it doesn't expand.

    render() {
      return (
        
          
          
            
          
        
      );
    }
    

提交回复
热议问题