Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Developer
Blackmoe
Posts: 19
Registered: ‎07-16-2012
My Device: Playbook, Z10, Z30
My Carrier: Rogers
Accepted Solution

Detecting navigation bar presence

Is there any way to detect when a user has the navigation bar visible either through the top down swipe or has it pinned? My custom active bar is getting covered and my screen elements positioning aren't taking the navigation bar presence into consideration.

Please use plain text.
Developer
Blackmoe
Posts: 19
Registered: ‎07-16-2012
My Device: Playbook, Z10, Z30
My Carrier: Rogers

Re: Detecting navigation bar presence

Anyone?

Please use plain text.
Developer
Blackmoe
Posts: 19
Registered: ‎07-16-2012
My Device: Playbook, Z10, Z30
My Carrier: Rogers

Re: Detecting navigation bar presence

I'm still in need of a solution to this perplexing (to me) problem.

 

As an example of desired behavior check out the Kobo app and go to the Library view. Note the bottom app menu... Now swipe down to reveal the navigation bar. See how the Kobo menu bar moved up instead of getting covered? 

 

My app need to detect the nav bar so I can move my custom bottom menu bar

Please use plain text.
BlackBerry Development Advisor
bbenninger
Posts: 130
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Detecting navigation bar presence

If your Activity is not declared fullscreen it automatically resizes when the bar is shown. Otherwise, if it is fullscreen, it appears as an overlay.
Please use plain text.
BlackBerry Development Advisor (Retired)
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: Detecting navigation bar presence

Hey Blackmoe (sorry about the delay),

 

Though you cannot programmatically determine when the nav bar is showing, you can still have your layout be auto-resized when it pops up.

 

The caveat here is that if you've defined your activity to act as "fullscreen", the nav bar will show up over top of your layout. Removing this flag will allow your activity/layout to be automatically resized, thus not obscuring your view(s).

 

Hopefully that helps,

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.
Developer
Blackmoe
Posts: 19
Registered: ‎07-16-2012
My Device: Playbook, Z10, Z30
My Carrier: Rogers

Re: Detecting navigation bar presence

I changed my activities to not fullscreen but kept title bar as false.

 

Reloaded on my Z10 and got the same results as before. The navigation bar covers my bottom custom menu bar.

Please use plain text.
BlackBerry Development Advisor (Retired)
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: Detecting navigation bar presence

Hmm, that doesn't seem to match my results here. Is it possible that you've got the attribute on the layout itself (as well)?

 

If you're having no luck with that, you could log a bug from the link down below to have our developers take a look at it. You'll need to include a description of the problem, the OS that you're building against, and maybe some sample code / application that reproduces the issue.

 

Link: https://www.blackberry.com/jira/secure/Dashboard.jspa

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.
Developer
Blackmoe
Posts: 19
Registered: ‎07-16-2012
My Device: Playbook, Z10, Z30
My Carrier: Rogers

Re: Detecting navigation bar presence

After upgrading my test phone to 10.2 with Jellybean it now works as expected. My custom menu bar is automatically positioned above the navigation bar instead of behind it.

 

Because the navigation bar is now hard wired my app look a little cluttered. Is there going to be an option to hide the navigation bar since all it offers is the back icon and my menu bar already has that function.

Please use plain text.
BlackBerry Development Advisor
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10
My Carrier: Rogers

Re: Detecting navigation bar presence

Hello Blackmoe,

 

We are looking at an option to allow users to hide the navigation bar. Hopefully this will be available in a future release.

 

Thanks,

Matt

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Please use plain text.