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
Contributor
tom_anmoney
Posts: 24
Registered: ‎05-29-2013
My Device: Z10
Accepted Solution

Q10 specifying resources for OS 10.2

This article talks about using the "square" resource qualifier:

 

http://devblog.blackberry.com/2013/03/blackberry-q10-android-apps/

 

"square" is no longer used in Android 4.2, on which OS 10.2 is based.

 

How can I specify resources for the square screen now?

 

I was thinking about using sw360dp-sh360dp, but there is no such thing is shXXXdp,   I tried sw360dp-h360dp, but it doesn't appear to work.

 

Any ideas?

 

 

 

 

Retired
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B

Re: Q10 specifying resources for OS 10.2

[ Edited ]

Hey Tom,

 

The article specifies to put your Q10 assets in the res/drawable-small-square folder. This is mapped by the BlackBerry Android Runtime team so that you can target Q10 specifically and is not part of the standard Android project.

 

As such, it should still work on 10.2 :smileyhappy:

 

EDIT: I've just attempted this myself and can see that it is indeed not working. I'll raise a bug with the devs. Thanks for letting us know!

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Contributor
tom_anmoney
Posts: 24
Registered: ‎05-29-2013
My Device: Z10

Re: Q10 specifying resources for OS 10.2

The Android documentation says that "square" is deprecated and no longer used by the Android runtime.

 

I believe it will not be possible to target the Q10 directly.  You will have to specify the base resources which will be used for the Q10 (and other small screen devices), then use the swXXXdp and hXXXdp qualifiers to provide resources for larger devices.

Retired
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10

Re: Q10 specifying resources for OS 10.2

In BlackBerry 10.2, you can target the Q10 and Q5 by using res/drawable-small. That should work.

 

Thanks,

matt

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators