Linked Questions
58 questions linked to/from Determine if the device is a smartphone or tablet?
147 votes
30 answers
91k views
Tablet or Phone - Android
Is there a way to check if the user is using a tablet or a phone? I've got problems with my tilt function and my new tablet (Transformer)
-1 votes
2 answers
370 views
How to detect Tablet or Mobile in Android [duplicate]
Hello I have created an application, in that I want to detect Tablet or Mobile at startup. I have 5.5" Tablet. How to make it possible ?
-9 votes
3 answers
442 views
How to change icon in runtime based on device(phone or tablet) with out if-else statement? [duplicate]
To determine the device type(i.e. phone or tablet), Determine if the device is a smartphone or tablet? "isTablet" is the variable which holds the device type. To change icon dynamically in java class ...
227 votes
15 answers
110k views
Android: allow portrait and landscape for tablets, but force portrait on phone?
I would like tablets to be able to display in portrait and landscape (sw600dp or greater), but phones to be restricted to portrait only. I can't find any way to conditionally choose an orientation. ...
96 votes
13 answers
75k views
Detect 7 inch and 10 inch tablet programmatically
Is there a way to programmatically find whether the device the app is installed on is a 7 inch tablet or a 10 inch tablet?
109 votes
11 answers
159k views
How to Lock Android App's Orientation to Portrait in Phones and Landscape in Tablets?
I am developing an Android app whose orientation I don't want changed to landscape mode when the user rotates the device. Also, I want the locked orientation to be portrait mode on phones and ...
60 votes
8 answers
91k views
How to detect device is Android phone or Android tablet?
I have two apps for Android tablets and Android phones. For tablet app I set android:minSdkVersion="11". But nowadays Android phones like Galaxy S3 has Android version 4.0.4 so S3 users can download ...
31 votes
10 answers
35k views
How to find Tablet or Phone in Android , Programmatically?
My case is that the logic is same for both Phone and Tablet. But there is slight difference in the layout. And I tried with the following code public static boolean findoutDeviceType(Context context) ...
18 votes
4 answers
11k views
How do I lock screen orientation for phone, but not for tablet? (Android)
I have been working on a Android project, that is intended to be compatible with both the Android phones and tablets. On the tablet the app is working great and looks good too. However, on the phone ...
10 votes
4 answers
7k views
Disable landscape orientation for phones but allow for tablets
So the general consensus is this; most people use their phones in portrait and most people use their tablet in landscape. Depending on which activity it is my app's layout goes crazy when you rotate ...
6 votes
3 answers
5k views
Android - How to set visibility in xml depending on device?
I have a TextView in my activity that should be visible normally, but gone for tablet devices. I know I can create a new layout file for the tablet, but that seems like a lot of duplication, so what ...
7 votes
2 answers
8k views
Distinguish between Tablet and Smart phone on ICS
I understand that by default (pre ICS), to distinguish between a Tablet & Smartphone, a developer can use the sdk version in the Android Manifest (apart from screen size and openGL filters). Now ...
8 votes
2 answers
8k views
Xamarin Android lock orientation to portrait on phone only
I am trying to lock the orientation of an entire app on phone sized layouts to portrait only but allow both portrait and landscape on tablet sized layouts. I know that I can attribute the Activity to ...
3 votes
5 answers
5k views
How to find out if application is running on tablet or mobile device in android?
I am developing an android application which is compatible for mobile screen and tablet screen both. So I am creating 4 different screens for each. That is login_portrait.xml login_landscape.xml ...
10 votes
2 answers
3k views
Android Universal App Approach
I want to develop an universal app . I am novice to this approach .That means a single apk for both tablet and phone application . I had go through Support Library Fragments My aim is to build ...