screen-size

What parameters does the css media type “handheld” care about?

大憨熊 提交于 2019-12-01 17:05:29
问题 I need to change style on a page depending on if it's a handheld device (such as a cell phone) or a large screen device, such as a laptop, stationary pc or a tablet. I know I could detect the resolution by the css max-width query and alike, but that does not feel convincing. Mainly because today's smartphones have such high-res screens. I.E. the Sony Xperia S, it has got a 720p by 1280 screen, but it's only 4,3". Whereby a 10px font, which on a normal computer screen would be readable, will

Raspberry Pi Qt5 Set physical screen size

≡放荡痞女 提交于 2019-12-01 16:44:58
问题 I am developping a qt5 application on my raspberry pi on raspbian using cross compilation. When I run it, I get a black screen trying display a Pop-up which is a QFrame. I suppose that it cannot be positioned because I have error messages arriving at the beginning : EGLFS: Unable to query physical screen size, defaulting to 100 dpi. EGLFS: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). EGLFS: Unable to query screen depth, defaulting to 32.

How to know whether its a tablet or phone in android programmatically? [duplicate]

守給你的承諾、 提交于 2019-12-01 06:20:36
问题 This question already has answers here : Tablet or Phone - Android (30 answers) Closed 5 years ago . I would like to get to detect whether the given device is a tablet or phone in android.I have tried the two in the simulator but none worked. Both are here: First if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE) { //code } Second private boolean isTabletDevice() { if (android.os.Build.VERSION.SDK_INT >= 11) {

Android - detect small tablet vs big phone?

丶灬走出姿态 提交于 2019-12-01 06:19:06
The app I'm developing contains 2 separate layouts: one is for the regular phones, other for small tablets such as NOOKcolor. The decision which is which is made based on the screen width resolution (currently 600dip). It looks great on Nook but terrible on HTC Rezound, which has a 720 x 1280 display. On the latter, regardless of higher resolution, everything (text, images, etc) look much larger so it gets all bunched up. What would be a good approach to pick the right device? Perhaps detect physical size (4.3" vs 7") vs resolution? Use the following method to detect your device's screen size:

Android - detect small tablet vs big phone?

寵の児 提交于 2019-12-01 03:57:10
问题 The app I'm developing contains 2 separate layouts: one is for the regular phones, other for small tablets such as NOOKcolor. The decision which is which is made based on the screen width resolution (currently 600dip). It looks great on Nook but terrible on HTC Rezound, which has a 720 x 1280 display. On the latter, regardless of higher resolution, everything (text, images, etc) look much larger so it gets all bunched up. What would be a good approach to pick the right device? Perhaps detect

How to get the size of the screen size in a canvas in android?

女生的网名这么多〃 提交于 2019-12-01 00:52:52
I am able to get the screen size in the normal activity but I need to get the screen size in a canvas view & manipulate in accordance with it.Any snippet on it will be helpful.Thanks. i got widthPixels heightPixels use ing this. DisplayMetrics metrics = getBaseContext().getResources().getDisplayMetrics(); int w = metrics.widthPixels; int h = metrics.heightPixels; 来源: https://stackoverflow.com/questions/9124797/how-to-get-the-size-of-the-screen-size-in-a-canvas-in-android

Smallest Width for Galaxy S and Galaxy S2

浪子不回头ぞ 提交于 2019-11-30 20:34:39
I'm developing an Android Widget and need to differentiate between Galaxy S and Galaxy S2 . I almost read everything about Screen sizes and densities articles. And I need, of course, to use the new qualifiers with the new qualifier Smallest Width . My problem is, that the sw320dp qualifier match for Galaxy S and also for Galaxy S2. But I need another layout for Galaxy S2, but cant find the right qualifier for it. Definition of Galaxy S, Density 233 Screen Size in Pixels: 480 Pixel x 800 Pixel Screen Size in dp: 329dp x 549dp (cause 1dp = 1pixel/(density/160) -> so the qualifier sw320dp must

How to get the size of the screen size in a canvas in android?

情到浓时终转凉″ 提交于 2019-11-30 19:49:50
问题 I am able to get the screen size in the normal activity but I need to get the screen size in a canvas view & manipulate in accordance with it.Any snippet on it will be helpful.Thanks. 回答1: i got widthPixels heightPixels use ing this. DisplayMetrics metrics = getBaseContext().getResources().getDisplayMetrics(); int w = metrics.widthPixels; int h = metrics.heightPixels; 来源: https://stackoverflow.com/questions/9124797/how-to-get-the-size-of-the-screen-size-in-a-canvas-in-android

Best way to detect mobile device and redirect

∥☆過路亽.° 提交于 2019-11-30 19:43:20
Here's my snippet for detecting a mobile display based on the screen size. You can force the site to stay in desktop-mode by adding a forceDesktop param to the URL. I`m new to jquery so if you have suggestions, please comment. Credits go to brandonjp: How can I get query string values in JavaScript? <script> $.urlParam = function(name, url) { if (!url) { url = window.location.href; } var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url); if (!results) { return undefined; } return results[1] || undefined; } window.onload = function() { var forceDesktop = $.urlParam('forceDesktop');

Android and supporting multiple screens layouts

好久不见. 提交于 2019-11-30 19:34:55
I'm finishing off an Android app, all that remains is to adapt the UI layouts and graphics for multiple devices. I need particular elements placed in particular positions on the screen. The Android docs explain how the multiple screen resolutions and sizes are classified, and explain the resource tagging system. For example, both WVGA800 (480x800) and WVGA854 (480x854) are classified as normal high density screens. To cater for these you're asked to create a folder called "layout" (already present for "normal") and "drawable-hdpi". The problem is this does nothing to differentiate two devices