react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

leftButton not appear.

Open igor-martucelli opened this issue 8 years ago • 16 comments

Issue Description

Hello guys, everything good ? I'm having a problem with the leftButton, they work normally while I'm debugging and with the usb cable plugged, but when I removed the cable, and opened the application again, the leftButton does not appear. Does anyone know why this occurs? And how can I solve it?

Steps to Reproduce / Code Snippets / Screenshots

screenshot from 2018-03-06 12-08-16


Environment

  • React Native Navigation version: v1
  • React Native version: 0.54
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Device and emulator (both OS: 7.1.1)

igor-martucelli avatar Mar 06 '18 15:03 igor-martucelli

Is navigatorButtons correct? Have you tried setButtons? Here is the API link for V2, but it does not give you anything...

karlmosenbacher avatar Mar 07 '18 04:03 karlmosenbacher

Yes, navigatorButtons is correct, I tried to use setButtons and I had the same result. I will try to use api v2. Thank's @karlmosenbacher.

igor-martucelli avatar Mar 07 '18 11:03 igor-martucelli

Well, if you are using RNN version 1 you should stick to that API instead. Thought you had written V2 in your environment description?. But I have seen quite many issues regarding navigatorButtons on Android lately so you are definitely not the only one. Do we know if version 1 still gets updated?

karlmosenbacher avatar Mar 07 '18 14:03 karlmosenbacher

I wrong description of the problem, but I straightened. (I so sorry) I tried using v2, but still there is not much implementation there, and for my needs I still use v1. Now, by answering your question, I do not know if v1 still gets updates, but I hope so.

igor-martucelli avatar Mar 07 '18 17:03 igor-martucelli

@igor-nm leftButton id have limited values (its not like right Button) id can be only: back cancel accept sideMenu

https://github.com/wix/react-native-navigation/blob/master/docs/adding-buttons-to-the-navigator.md#android-left-button

try this:

leftButtons: [{
            id: 'back',
            title: 'Back',
        }
]

sytolk avatar Mar 08 '18 12:03 sytolk

Hi @sytolk, i tried change of id's, but do continue to happen the problem. I'll show you an example of how it was: screenshot from 2018-03-08 18-48-03

Any solution is welcome.

igor-martucelli avatar Mar 08 '18 21:03 igor-martucelli

@igor-nm I have update my previous comment. Have you tried to change id to back and in Android (I don't know you OS?) left back button will be displayed only if it's have an other screen in backStack. For example in an other screen its have navigation.push('Conversation')

sytolk avatar Mar 09 '18 07:03 sytolk

@sytolk The application uses the singleApplication concept, so when I browse between screens, which is currently logged in and talk, I use navigation.resetTo ('MyScreen'). My OS is android, but I testing in apple OS too.

igor-martucelli avatar Mar 09 '18 14:03 igor-martucelli

@igor-nm : In dev, Images are served by the packager, so if you unplug the device and restart the application, it might not be able to load the image (because the connection to the packager goes through the cable).

This might not be a react-native-navigation bug.

adrienthiery avatar Mar 14 '18 14:03 adrienthiery

@adrienthiery I see that you are far away from this issue :) but can you try to repeat this (unplug the device and so on..) with Android emulator ;)

sytolk avatar Mar 14 '18 19:03 sytolk

@sytolk, not sure what you mean by unplug the device with the Android emulator ?

adrienthiery avatar Mar 14 '18 22:03 adrienthiery

@adrienthiery I mean that the tales with packager and USB cable is not for this issue.. you can try to use emulator instead ;)

sytolk avatar Mar 15 '18 09:03 sytolk

Ok, sorry about that, the fact that the issue literally states they work normally while I'm debugging and with the usb cable plugged, but when I removed the cable, and opened the application again, the leftButton does not appear. made me think it was related

adrienthiery avatar Mar 26 '18 19:03 adrienthiery

Ah, good reason @adrienthiery :+1: but I fall into this issue from the title only and this part miss me in my reading by diagonal..

sytolk avatar Mar 27 '18 07:03 sytolk

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 version and report back. Thank you for your contributions.

stale[bot] avatar Jun 02 '18 04:06 stale[bot]

This problem happen when are debug mode, but when started as release not happen none problem and that's why that I'm closing this problem.

igor-martucelli avatar Jun 05 '18 11:06 igor-martucelli