React Native, change React Navigation header styling

前端 未结 5 429
孤街浪徒
孤街浪徒 2021-02-01 19:54

I\'m implementing React Navigation in my React Native app, and I\'m wanting to change the background and foreground colors of the header. I have the following:

/         


        
5条回答
  •  醉梦人生
    2021-02-01 20:29

    Notice! navigationOptions is differences between Stack Navigation and Drawer Navigation
    Stack Navigation Solved.
    But for Drawer Navigation you Can add Your own Header and Make Your Styles with contentComponent Config:
    First import { DrawerItems, DrawerNavigation } from 'react-navigation' Then

    Header Before DrawerItems:

    contentComponent: props => Your Own Header Area Before .

    Footer After DrawerItems:

    contentComponent: props => Your Own Footer Area After .

提交回复
热议问题