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™ Development

Posts: 264
Registered: ‎10-05-2010
My Device: Not Specified
Accepted Solution

Remove return bar on Q10 720x720 device

[ Edited ]

I'm porting an Android app over to BB10. It works great with the Z10 touch device but I'm finding that with the bottom line with the "go back" button takes up so much space that there is not enough real estate left for the app. Is there a way to turn it off? Or is there another way to reclaim some of that space? 


Is there a way to make BB specific layouts in the android xml layout files? I'd like to avoid having to maintain two separate apps.


Trusted Contributor
Posts: 160
Registered: ‎11-17-2010
My Device: PlayBook, Z10, Q10

Re: Remove return bar on Q10 720x720 device



Yes, there is a way to add a new layout which will be active just on the Q10/Q5 (actually on all devices with the same form factor, however I've never seen an Android smartphone with an 1/1 screen and a keyboard).


You are supposed to put your adapted layout files in the /res/layout-small-square folder (respectively /res/drawable-small-square).

For more details see this post: http://devblog.blackberry.com/2013/03/blackberry-q10-android-apps/


If you find this post useful please Like it.
If it solves your problem please mark as solution.
Posts: 50
Registered: ‎07-17-2008
My Device: 8310

Re: Remove return bar on Q10 720x720 device

[ Edited ]

"For more details see this post: http://devblog.blackberry.com/2013/03/blackberry-q10-android-apps/"


In above link "\layout-small-square" is mentioned for Q10 screen but it doesn't work on 10.2 simulator. I use "\layout-small-xhdpi" and \drawable-small-xhdp for Q10, it works well on the simulator and device.


EasyDialer -- Calling card dialer, Google Voice Dialer, Conference Call dialer! Relieve the pain of dialing lengthy numbers...
If you love it, please let friends know.
If you hate it, please let me know.

Posts: 264
Registered: ‎10-05-2010
My Device: Not Specified

Re: Remove return bar on Q10 720x720 device

I ended up just calculating it in the views.


I measured the device screen height and width with some assumptions to determine if it is a square device. I know it's not architecturally clean. But it's independant of future API changes so hopefully less likely to break.


Trapping the keys is a bit interesting since Android devices don't have hardware keyboards, nor does a simulator, and I don't have a Q10. I wonder if it works? I put a bluetooth keyboard on an Android device and hoped that was the same...



Posts: 140
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Remove return bar on Q10 720x720 device

Different layouts won't give you the ability to dismiss the navigation bar.  But we've given the user the ability to disable it for specific apps on 10.2; just swipe down from the top and you'll see an option appear that allows you to dismiss it.


Strictly from an Android standpoint, they don't expose an API to dismiss it permanently (yet) because then a (stupid) app could disable it and give the user no way of exiting the app.  We have the bezel gesture so we're a tad more relaxed on this.

Posts: 1
Registered: ‎11-16-2013
My Device: Q5, Playbook, 9900, 9810, 8900, 8520, 8320, 8220
My Carrier: Vodafone

Re: Remove return bar on Q10 720x720 device


I am also interested in to remove this bar.
If I understand correctly, it is not possible to do so permanently. But if in the first execution, the bar does not appear by default, it is a good solution for me. Although user can enable or disable as his wish. Then, it is possible make it disappear by default without requiring the user manual action?

Thanks in advance.

Posts: 15
Registered: ‎03-16-2012
My Device: Q10, Z10
My Carrier: n/a

Re: Remove return bar on Q10 720x720 device

[ Edited ]

That would be really nice to have an option to disable Navigation bar via AndroidManifest.xml file. Most modern Android apps use action bar and does not rely on back hw button. There is no reason to have it in some cases. Blackberry has an app review process. Reviewers can check if navigation bar hidden correctly.


I would propose the following value in AndroidManifest.xml:


    <!-- Skipped -->
    <meta-data android:name="com.blackberry.navigationbar" android:value="false" />