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

前端 未结 6 1993
小鲜肉
小鲜肉 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条回答
  •  你的背包
    2021-01-30 03:50

    You can return multiple SafeAreaViews from your render method using Fragment, each of which independently specify their backgroundColor:

    render = () => (
      
        
        
      
    );
    

    Result on an iPhone X:

提交回复
热议问题