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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Android™ Runtime Development

Reply
New Contributor
DavidBerroa
Posts: 5
Registered: ‎02-13-2012
My Carrier: AT&T

Android App on blackbook, not detecting tablet layout-sw600dp. How would I get it to display tablet instead of phone?

I have an android application that detects on startup by using layout-sw600dp that if the unit is 600dp wide that it will run the tablet layout. This works on my Transformer Prime but on the playbook it is giving a stretched out version of the phone layout.

 

How can I get it to detect the tablet layout? Specfically, what is the width of the screen that it thinks that it is a phone instead of a tablet.

Please use plain text.
New Contributor
mduhagon
Posts: 2
Registered: ‎01-08-2013
My Carrier: None

Re: Android App on blackbook, not detecting tablet layout-sw600dp. How would I get it to display tablet instead of phone?

Hello, I am porting an android app an having the same issue. 

 

In the playbook, the app seems to be using the default layout (the one in /layout/ folder) instead of the one set for a bigger screen (the one in /layout-sw600dp/).

 

The problem is that If I change this layout to optimize it for the playbook, things will be too big for the blackberry 10 phone... 

 

Anyone else experiencing this?

Please use plain text.
New Contributor
mduhagon
Posts: 2
Registered: ‎01-08-2013
My Carrier: None

Re: Android App on blackbook, not detecting tablet layout-sw600dp. How would I get it to display tablet instead of phone?

For anyone out there having a similar issue, I kept testing, and the playbook did take layout-large. The blackberry 10 phone takes the files from layout, so I was able to tweak things for each device.

Please use plain text.
Regular Contributor
karthikpalanivelu
Posts: 59
Registered: ‎10-19-2012
My Carrier: Rogers

Re: Android App on blackbook, not detecting tablet layout-sw600dp. How would I get it to display tablet instead of phone?

[ Edited ]

The feature "layout-sw600dp" was introduced only after Android 3.2 So it wont work for BB Android runtime as it is based on 2.3.3. But layout-xlarge worked for me. You might also try layout-large as mduhagon suggested.

 

And please edit the title and replace blackbook with PlayBook.

----------------------------------------------------------------------------
Karthik Palanivelu
Android and BlackBerry Developer
endless appMarket

Follow Us. We are Everywhere.
Facebook, Google+, Twitter, LinkedIn
----------------------------------------------------------------------------
Please use plain text.
New Contributor
DavidBerroa
Posts: 5
Registered: ‎02-13-2012
My Carrier: AT&T

Re: Android App on blackbook, not detecting tablet layout-sw600dp. How would I get it to display tablet instead of phone?

I don't see the ability to edit the title.
Please use plain text.