2

I am newbie to convert android apps to bb10. I converted one app to bb10 compatibility. The app is compatible with both device and tablet in android.I successfully run it in bb10 simulator. But the app doesn't show the UI part completely. Why? I have one more doubt generally BB10 devices shape is rectangle but simulator shape is square. why?

BlackBerry Image BB10

Android Image

Android Image

Cœur
  • 37,241
  • 25
  • 195
  • 267
naresh
  • 10,332
  • 25
  • 81
  • 124
  • First of all, one cannot say that BB10 device shape is rectangle, because there are two different devices: Z10 with rectangle layout, Q10 (that is upcoming or even just placed to market) with a scare layout of 720*720(?) pixels. And, of cause, your Android port could run on PlayBook, which has a different resolution than Z10, and is not really a BB10 device. For me it is not quite clear what UI part is missing, do you mean menu? – Schlangi Apr 23 '13 at 07:36
  • I mean entire screen is not fitted in the BB10. Please refer the image for more clarity. – naresh Apr 23 '13 at 08:59

1 Answers1

0

That is because your UI needs more space than the resolution provides. If you would place your controls within a scrollable container, you would be able to scroll down to the missing parts of your UI.
If you choose that container to automatically show the scrollbar, this would only be seen on Q10 but not on Z10. Try to switch your simulator to Z10 resolution, then it will propably show all your UI elements.

The real solution would be really to define the UI in relation to the resolution.

To start with this, here is an excellent definition on how to cluster your layout resources for your Android app. Your problem will disappear, when defining an appropriate layout for the minimum height(!) of e.g. 600dp and one for 800dp. The one with 600dp will be used for the Q10 (because it has 720px physical height) and the other one for the Z10 (that has 1280px).

By the way: you should encounter the same problem on some Android device, since there are a few with nearly square display (I remember a "BlackBerry clone" by HTC?). But of cause, these devices are really rare...

Schlangi
  • 1,135
  • 1
  • 9
  • 19
  • I download the BlackBerry10.1 simulator from http://developer.blackberry.com/android/tools/. is it Z10 or Q10? I developed the app for both mobiles and tablets and you said that, my UI needs more space then where should i change the UI related code. Here what i am asking is In which layout like "layout-large,layout-small" we need to change code that effects the BB10? – naresh Apr 23 '13 at 09:35
  • The simulator is for both Q10 and Z10, you can choose on boot which device to simulate. Make sure you got the latest simulator. – Schlangi Apr 23 '13 at 11:06
  • yes. I installed the latest one. But how to select the device? – naresh Apr 23 '13 at 11:08
  • I did not need to do so, so far. That is, why I can't tell for sure what you need to change (layout-large, layout-small...) and you did not enclose in your question, which kind of GUI definition you use. I assume, you have defined your screen with the standard XML files and inflate them in activity code? – Schlangi Apr 23 '13 at 13:17
  • Yes. I maintain same xml file with some changes in UI part like margin or padding.. in different folders(layout-small,layout-normal,layout-large,layout-sw600) because we need to provide multiple screen support. Now which folder is related to the BB10. Now i think it is clear to you. – naresh Apr 23 '13 at 13:50
  • I am checking the one android app for BB10 compatibility using on line tool then it says that it is not compatible because you are using armebi(impact: 5 and Reason: (AndroidManifest.xml) native-code: armeabi). Do you have an idea to make this app as compatible with feature. – naresh Apr 23 '13 at 14:11
  • Regarding your last comment: that is a really other question. Native Android code cannot be ported by this means, but maybe you can replace the native Android code with native BB10/QNX code library. From my point of view, this could work. But I am not sure. Regarding the initial question: Is it solved for you? (Then I would be happy about an "accept answer" action...) – Schlangi Apr 25 '13 at 13:34