Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong menu icon color in Android. #1537

Closed
Gloix opened this issue Jan 23, 2018 · 5 comments
Closed

Wrong menu icon color in Android. #1537

Gloix opened this issue Jan 23, 2018 · 5 comments

Comments

@Gloix
Copy link

Gloix commented Jan 23, 2018

react-native, react and native-base version

react-native (0.52.0), react (16.2.0) and native-base (2.3.7)

Expected behaviour

White menu icon on Android.

Actual behaviour

The menu icon has the iOS blue color. (iosToolbarBtnColor | "#007aff")

Steps to reproduce (code snippet or screenshot)

    <Header>
        <Left>
            <Button
                transparent
                onPress={() => this.props.navigation.navigate("DrawerOpen")}>
                <Icon name="menu" />
            </Button>
        </Left>
        <Body>
            <Title>HomeScreen</Title>
        </Body>
        <Right />
    </Header>

Screenshot of emulator/device

image

Any other additional info which would help us debug the issue quicker.

Not using CRNA, not declaring a custom theme. Already ran react-native link. Running in a physical device.

@SupriyaKalghatgi
Copy link
Contributor

@Gloix Please verify the variables from here against your them

@Gloix
Copy link
Author

Gloix commented Jan 24, 2018

Actually, version 2.3.7, which I have installed, has that line right

toolbarBtnColor: platform === "ios" ? "#007aff" : "#fff",

I also checked Platform.OS and it is Android.
I noticed I hadn't included the main theme, so I loaded it in, but the problem persists.

@akhil-ga
Copy link
Contributor

@Gloix Check line here in version 2.3.7 .

@Gloix
Copy link
Author

Gloix commented Jan 25, 2018

So, if I understand it right:

  • commonColor.js declares common colors to all default themes
  • material.js declares a material design like theme (although some checks are made for minor accomodations to the current platform?).
  • platform.js declares a platform dependent theme.

I noticed the extracted theme from the theme setup instructions points to variables/platform, so it's using platform.js, and therefore is using the toolbarBtnColorproperty as @akhil-geekyants points:

toolbarBtnColor: "#007aff",

which actually produces the light blue menu tinting.

Now, is this color intended? I'm asking since every demo screen shown has a white menu icon like in the Readme file (and also looks more natural IMO):

Android demo animation

SupriyaKalghatgi added a commit that referenced this issue Feb 2, 2018
Fix for issue #1537 (Wrong menu icon color in Android)
@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants