React-native-navigation: Top bar left button is too big

Created on 30 Oct 2019  路  8Comments  路  Source: wix/react-native-navigation

Issue Description

In the release apk of the application, the top bar left icon is always bigger that it should whereas the right icon as in the correct size. This bug is only on release.apk, not in debug.apk

Screenshot_20191030-105944_Meme Studio Pro

Both buttons have the exact same icon as source.

Steps to Reproduce / Code Snippets / Screenshots

Navigation.push(this.props.componentId, {
            component: {
                name: constants.CANVAS_SIZE_SCREEN.id,
                passProps: {
                },
                options: {
                    topBar: {
                        height: Dimensions.get('window').height * palette.MAIN_TOP_BAR_HEIGHT,
                        visible: true,
                        title: {
                            text: constants.CANVAS_SIZE_SCREEN.name,
                            alignment: 'center',
                            color: 'white',
                            waitForRender: true,
                        },
                        borderHeight: 1.3,
                        elevation: 1.5, // TopBar elevation in dp,
                        background: {
                            color: palette.SECONDARY_DARK
                        },
                        leftButtons: [
                            {
                                id: 'BackButton',
                                icon: require('../assets/btn_succeed.png')
                            }
                        ],
                        rightButtons: [
                            {
                                id: 'ProceedButton',
                                icon: require('../assets/btn_succeed.png')
                            }
                        ]
                    },
                    sideMenu: {
                        left: {
                            visible: false,
                            enabled: false
                        }
                    }
                }
            }
        });

Environment

  • React Native Navigation version: 3.2.0
  • React Native version: 0.59.10
  • Platform(s) (iOS, Android, or both?): Android (haven't tested iOS)
  • Device info (Simulator/Device? OS version? Debug/Release?):S7 Edge, Android 8, Release only
馃彋 stale

Most helpful comment

Just saw seconds ago that this works fine on the release build of playgroud app.

@koiralakiran1 Make sure you icon contains all required resolutions (@2, @3 etc)

This fixed the issue for me. Thanks @guyca

All 8 comments

I do have the same issue like @meraklis56. Icon is good when debug but get too big on release build.

I have a similar issue but with right button. In my case the height is good but width is stretched almost double. In RNN v2 it works good but in v3 and v4 not. I've tested it on ios 13 on simulator and on real iPhone Xs. React-native 0.61.5.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

The issue has been closed for inactivity.

@stalebot this is still an issue

@stalebot still an issue

I'm facing this issue as well, for release build.

React native version: 0.63.2
RNN version: 7.0.0

image

@koiralakiran1 Make sure you icon contains all required resolutions (@2, @3 etc)

Just saw seconds ago that this works fine on the release build of playgroud app.

@koiralakiran1 Make sure you icon contains all required resolutions (@2, @3 etc)

This fixed the issue for me. Thanks @guyca

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henrikra picture henrikra  路  3Comments

zhanguangao picture zhanguangao  路  3Comments

yayanartha picture yayanartha  路  3Comments

kiroukou picture kiroukou  路  3Comments

switchtrue picture switchtrue  路  3Comments