09-03-2013 06:28 PM - edited 09-03-2013 06:30 PM
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.
Solved! Go to Solution.
09-04-2013 05:47 AM
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-q
09-24-2013 01:09 AM - edited 09-24-2013 01:11 AM
"For more details see this post: http://devblog.blackberry.com/2013/03/blackberry-q
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.
09-24-2013 09:49 AM
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...
10-17-2013 05:24 PM
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.
11-16-2013 08:23 AM
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.
11-27-2013 04:11 PM - edited 11-27-2013 04:12 PM
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:
<manifest> <application> <!-- Skipped --> <meta-data android:name="com.blackberry.navigationbar" android:value="false" /> </application> </manifest>