【问题标题】:how to change color of Backbutton Arrow in react native router flux?如何在反应本机路由器通量中更改后退按钮箭头的颜色?
【发布时间】:2016-12-12 15:59:57
【问题描述】:

如何在反应本机路由器通量中更改后退按钮的颜色?

我尝试backButtonBarStyle 但没有工作...我找不到任何解决方案.tnx 寻求帮助

<Scene key="app"  navigationBarStyle={{backgroundColor: '#1e2226',borderBottomColor:"#1e2226"}}  titleStyle={{color : "#FFF"}}>
    <Scene  key="welcome" component={LauchContainer} title="Welcome" />
    <Scene key="ProductDetail"  backButtonBarStyle={{color : "#FFF"}} component={ProductDetail} />
  </Scene>

【问题讨论】:

    标签: reactjs react-router react-redux react-native


    【解决方案1】:

    查看文档,您应该使用 backButtonTextStyle 或使用 backButtonImage 来使用不同的图标图像

    Check it out here

    更新:

    您可以通过在leftButtonIconStyle 属性中设置tintColor 来更改图像的颜色

    【讨论】:

    • Tnx 为您解答...但我想更改箭头的颜色而不更改图像...这可能吗?
    • 嗯,好的,尝试使用leftButtonIconStyle 并在其中添加tintColor: "red"
    • 太棒了!可能想接受这个答案,以便其他人知道它有效! ;)
    【解决方案2】:

    在场景中添加这两行backButtonTintColor = '#000' leftButtonStyle = {{color : '#000',tintColor : '#000'}}

    如下

    <Scene
              key="Scene Key"
              component={Scene Component}
              title="Your title"
              backButtonTextStyle = {{color:'#000000'}}
              barButtonIconStyle={{ tintColor: '#000000' }}
              titleStyle = {{color : '#000000'}}
              navigationBarStyle = {{backgroundColor : '#ffc60a'}}
              backButtonTintColor = '#000'
              leftButtonStyle = {{color : '#000',tintColor : '#000'}}
              //hideNavBar={true}
            />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-13
      • 1970-01-01
      • 2018-12-02
      • 1970-01-01
      • 2013-08-25
      • 1970-01-01
      • 1970-01-01
      • 2017-12-01
      相关资源
      最近更新 更多