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
New Contributor
DavidBerroa
Posts: 5
Registered: ‎02-13-2012
My Device: None, eyeing Playbook

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.

New Contributor
mduhagon
Posts: 2
Registered: ‎01-08-2013
My Device: Android

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?

New Contributor
mduhagon
Posts: 2
Registered: ‎01-08-2013
My Device: Android

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.

New Developer
karthikpalanivelu
Posts: 65
Registered: ‎10-19-2012
My Device: BlackBerry PlayBook

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.

New Contributor
DavidBerroa
Posts: 5
Registered: ‎02-13-2012
My Device: None, eyeing Playbook

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.