hugotomazi / navigation-bar

Navigation Bar plugin for Capacitor
MIT License
59 stars 20 forks source link

Not working in Capacitor V5? #23

Closed mikelnorth closed 9 months ago

mikelnorth commented 1 year ago

I have added this to my application but it does not seem to work, is this plugin compatible with v5? I am just trying to change the icons. I was able to make the navBar transparent and then just style the safe area to be the color I want.

    NavigationBar.setColor({ color: '#fffff', darkButtons: true });

Package.json

    "@capacitor/android": "^5.0.5",
    "@capacitor/app": "^5.0.3",
    "@capacitor/browser": "^5.0.3",
    "@capacitor/cli": "^5.0.5",
    "@capacitor/core": "^5.0.5",
    "@capacitor/ios": "^5.0.5",
    "@capacitor/keyboard": "^5.0.4",
    "@capacitor/preferences": "^5.0.4",
    "@capacitor/status-bar": "^5.0.4",
"@hugotomazi/capacitor-navigation-bar": "^2.0.1",
mikelnorth commented 1 year ago

Seems that the NavigationBar.setTransparency({ isTransparent: true }); works, so maybe just not setColor?

dlee commented 1 year ago

setColor works for me, but not on initial load. I need to wait 100ms after WebView init to call setColor for it to work.

Another issue I'm seeing, however, is that the darkButtons option doesn't seem to work. It gives me white buttons no matter what.

matleh commented 9 months ago

I am using Capacitor v5 and it works without any issues for me - I use setColor with both color and darkButtons params. I am calling it after the app is fully loaded during an initialization method.