Tablet Fullscreen active

Fox

Active Member
Licensed User
Longtime User
hey guys how can i check if it is an tablet and set my application in full screen mode?

I thought:

Dim resolution As Int
resolution=GetDeviceLayoutValues.Width
If resolution > (what) Then
this is my problem i don't know how can i set it in full?!
 

NJDude

Expert
Licensed User
Longtime User
To set your app in FULL SCREEN you have to do a couple of things, check the attached screen shots.

To find out if it's a tablet you can ask if the width is > 320 (if your app is set as portrait) or if the width > 480 (if set up as landscape)
 

Attachments

  • Project.JPG
    18.4 KB · Views: 322
  • Designer.JPG
    20.4 KB · Views: 311
Upvote 0

latcc

Banned
To set your app in FULL SCREEN you have to do a couple of things, check the attached screen shots.

To find out if it's a tablet you can ask if the width is > 320 (if your app is set as portrait) or if the width > 480 (if set up as landscape)
NJDude, that won't work - screens are improving...

My phone is 480x800 and there are phones which are more like 560x width (in Portrait orientation).

The smallest (7") tablets are also 480x800. The larger tablets (10") are 600x1024 or 800x1280.

So width test (portrait) for >= 600 is needed with layout support for 480x to cover the better phone displays.
 
Upvote 0

Rick in North Carolina

Member
Licensed User
Longtime User
This may be unusual but you could check to see if phone is supported, with the logic if not (or NONE in the following case), then it must be a tablet.

Using the phone library and phone object member:
GetPhoneType As String
Returns the phone radio type. Possible values: CDMA, GSM, NONE.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
I am also interested in finding a reliable way to distinguish a tablet from a smartphone and therefore I am digging up this rather old topic.

The previous post is a good solution but not 100% since there are tablets with phone-support (for instance Acer A501).

I guess one could also verify what Android OS is installed and if it is Honeycomb, one could be rather certain that it is a tablet since I think Honeycomb was only for tablets (although I know there were unofficial portings of Honeycomb to phones). However, if it is not Honeycomb (for instance Ice Cream Sandwich), then there is no way to tell......

I guess that verifying a combination of what written in this thread should most times be good. If not, one could add an option in user-settings of the app where the user can flag the device as a tablet.

Any other suggestions?
 
Upvote 0

HotShoe

Well-Known Member
Licensed User
Longtime User
tablet id

Here's how I determine if the app is being run on a tablet or not.


B4X:
If gi >= 600 AND gi < 1000 Then
   is800= True
      
   If Density = 1 Then
   'do whatever you need here

Tablets for now are a density of 1. So I check the density and the width or height as needed to determine which layout to load. In the example above, gi is the width (the app runs in landscape). This method works for all tablets up to the current 1280 x 800. Phones of high res are a density of 1.5 or 2.

--- Jem
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…