Questions tagged [screen-size]
The size of a screen is usually described by the length of its diagonal, which is the distance between opposite corners.
screen-size
742
questions
359
votes
18
answers
404k
views
Sizing elements to percentage of screen width/height
Is there a simple (non-LayoutBuilder) way to size an element relative to screen size (width/height)? For example: how do I set the width of a CardView to be 65% of the screen width.
It can't be done ...
224
votes
14
answers
328k
views
How to Determine Screen Height and Width
I've created a new application on Flutter, and I've had problems with the screen sizes when switching between different devices.
I created the application using the Pixel 2XL screen size, and because ...
181
votes
8
answers
479k
views
Most popular screen sizes/resolutions on Android phones [closed]
I understand that Android's developer site provides information on this topic. I have already read the following three pages:
Supporting Multiple Screens
Screen Sizes and Densites
Icon Design ...
131
votes
12
answers
336k
views
Text size and different android screen sizes
I know, it was discussed already 1000 times, but I can't adjust the text size for different screen sizes. I try to use 'sp' as size units in my custom style:
<style name="CustumButtonStyle" parent=...
48
votes
6
answers
187k
views
How to limit max width and height to screen size in CSS?
I'm trying to make a php gallery and thats why I need a good Mask, where the pictures later can be shown.
I want the Mask not to be bigger than screen-size. I mean, there must be no scrolling and the ...
36
votes
11
answers
46k
views
iOS get physical screen size programmatically?
Is this possible? I want the number of inches, not the number of pixels. I know it is approximately 160 ppi. But not exactly.
33
votes
8
answers
69k
views
How to get the visible size on an Activity?
How can I know the visible size of my activity?
I'm trying to get the Activity real size,
not the height and width from getHeight() and getWidth(),
which gives me the screen full size.
30
votes
4
answers
24k
views
Difference between "screen size" and "screen density" in Android?
I have a few questions:
What is the screen size?
What is the screen density?
What is a difference between screen size and screen density?
How I can support different densities and different screen ...
23
votes
6
answers
47k
views
Line break on mobile phone only
I have a phone number on a website. It looks good on a laptop, but on a mobile device half of the number jumps to the next line. It doesn't look good.
So how can I create a line break that will only ...
21
votes
3
answers
49k
views
how to handle different screen sizes in react native?
I am developing an application on react-native. I have made a UI which works fine on iPhone 6 but not working fine on iPhone 5 or lower versions.
How should I fix this ?
21
votes
9
answers
65k
views
How to set browser window size larger than the screen resolution in Windows XP?
I would like to set browser size (mainly width) larger than the screen resolution in Windows XP. It looks like there is no easy way of dragging the browser window and resizing it. It resizes to ...
20
votes
7
answers
15k
views
How to create two views in Android that use 50% height each, unless one is smaller?
Imagine a full Android device screen, I want it split in to two sections:
The upper half has text in it, which may be larger than the space available (or not) and so the text will scroll (i.e. ...
19
votes
8
answers
77k
views
Android Screen sizes
I need to know the screen sizes of android devices to support multiple screen sizes application.
19
votes
2
answers
19k
views
Flutter screen size calculation
I am getting sick trying to adapt my app to a certain tablet dimensions using flutter.
The tablet is a Samsung Galaxy Tab S5e with screen of 2560x1600.
When I make flutter return the screen ...
18
votes
5
answers
19k
views
How to get screen size on Windows Phone 7 Series?
How do I programatically get the screen resolution on WP7? Here are a bunch of links that get the same job done in desktop WPF and Silverlight, but none of them are in the Phone SDK.
Any ideas?
http:...
18
votes
3
answers
33k
views
android screen size,values-v11,values-v14
I found several values folders in my res folder:
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at ...
15
votes
8
answers
32k
views
What minimum screen size should I assume?
I'm designing various unsizeable forms and layouts in Delphi to run on Windows. I'm worried that if I assume a minimum 1024x768 screen size (or greater), I'll run into customers still using 800x600. ...
15
votes
7
answers
16k
views
Can’t use android:xlargeScreens="true"?
I am making app for phones, but I wan’t them to be usable on tablets. I don’t know why can’t. I use this in my android manifest file:
android:xlargeScreens="true"
I get this error:
error: No ...
15
votes
2
answers
7k
views
How can I alias an android bitmap to a drawable from another size (drawable-large-mdpi aliases to drawable-hdpi)
I'm working on adding support for tablet sized screens to my apps. I already have images in drawable-mdpi and drawable-hdpi for different density screens. My problem is with tablets like the Galaxy 7" ...
14
votes
3
answers
45k
views
jquery if statement based on screen size
I have a slide out nav bar that I would like open by default on screen width of >=1024 and closed by default < 1024. I have a button that toggles it open and closed it. I'm just starting to learn ...
13
votes
3
answers
14k
views
how to set image width height based on screen size in gridview
I want to show 3x3 sized gridview. I want to set the height and width based on device size. I am taking reference from this link.
MainActivity-
public class MainActivity extends Activity {
@...
12
votes
4
answers
7k
views
How do you specify in AndroidManifest.xml that you want to forbid installing on devices smaller than a 4.7-inch device?
I have a game that feels best on 7-inch tablets, and feels acceptably nice on 10-inch tablets and 5-inch Samsung Note-size devices. It's even just passably fun on something the size of a Nexus 4 ...
11
votes
2
answers
13k
views
Adjust GridView to all Screen Sizes
Im trying to implement a GridView as part of a image gallery. I followed the following example from the Android developer portal.
The tutorial seems to work for all screen sizes. As you can see below ...
11
votes
2
answers
4k
views
<compatible-screens> in Android
Good day, I am trying to restrict screen sizes to only handsets (i.e. not tablets) in google play. After I found this article I added this to my manifest file:
<compatible-screens>
<!-- ...
11
votes
0
answers
993
views
How to Android dialog (fullscreen, embedded) as in Google Calendar app
What I'd like to achive
A small/large screen behavior as it is implemented by Google in its Calendar app.
For example when you create a new event, on a large screen a 'dialog' opens
that darkens ...
10
votes
2
answers
5k
views
how do i make the canvas perfectly fit to the window size in p5
i want to make the p5 canvas fit perfectly to the window size, but whenever I use windowWidth and windowHeight , the canvas seems to be bigger:
is there any way to fix this?
10
votes
1
answer
831
views
How do I get size of the screen excluding Unity side panel in GDK
I'm trying to make Guake terminal work correctly in Unity. Its window have width that is equal to screen width. But because of Unity left bar window's right border becomes invisible. So, I want to set ...
10
votes
0
answers
2k
views
Xcode 6, 4 inch treated and 3.5 inch display [closed]
I am currently working on an iOS app and using new feature Use Size Classes in Xcode 6 with Swift language. Everything seems to work (elements are placed correctly for different screen sizes), but ...
9
votes
5
answers
7k
views
Getting screen size not from Activity subclass
I have a view subclass that starts from activity subclass like that:
this.setContentView(instanceOfMyView);
In that my view subclass I want to make some work with screen size, but all people here ...
9
votes
1
answer
17k
views
CSS: How to set the width and height dependent on the screen/window size?
Following up this question here I am trying to get a good rendering of a floating 3D cube using three.js. The camera proportions are window.innerWidth / window.innerHeight and since I am using a ...
9
votes
2
answers
11k
views
Program different layouts for different versions in android
I have to program my Android app with the best compatibility to different screen sizes (tablets and smartphones) and to the versions 2.3, 3.2 and 4.0.
I know about the possibliy to name the folders of ...
9
votes
3
answers
4k
views
Android and supporting multiple screens layouts
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 ...
9
votes
3
answers
27k
views
Handling all screen sizes android
I'm working on an android App,and it's designed with numbers (margins etc) no relative things so I think I'll find many problems with different screen sizes so I thought of making a function which ...
9
votes
5
answers
4k
views
Screenshots for iTunes Connect with wrong aspect ratio
Took screenshots for every size in the simulator and I'm having a problem with 4.7-inch (iphone 6) and 5.5-inch (iphone 6 Plus) screenshots only.... With 4-inch and 3.5-inch had no problem uploading.
...
9
votes
1
answer
21k
views
How to get iPad screen width in Javascript
I need to dynamically get the screen size of all mobile devices from a webpage using Javascript.
I have tried this:
//get window's size
if (document.body && document.body.offsetWidth) {
...
8
votes
2
answers
5k
views
On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?
On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing ...
8
votes
4
answers
88k
views
How to change CSS when the screen size changes
So I have looked into code for my website that would changes the css and even the html of certain sections of my code when the screen size changes. What I am looking into as a start is when I put my ...
8
votes
4
answers
22k
views
How to get the screen size of the device?
The desire have 480 x 800 pixels, 3.7 inches and the HD have 480 x 800 pixels, 4.3 inches screen specification.
I run the code that is accepted as answer from this thread How to get screen size of ...
8
votes
1
answer
24k
views
Android Changing image size depending on Screen Size?
So I need to change the size of an image depending on the area of the screen. The image will have to be half of the screen height, because otherwise it overlaps some text.
So Height= 1/2 Screen ...
8
votes
3
answers
6k
views
WebView is not filling the whole screen of device or emulator
I am developing an android application which loads a web application when started. To achieve the purpose I am using webview control. I want my webview to be displayed full screen so that it will give ...
8
votes
3
answers
502
views
iPhone app is running at iPhone 4 size with black bars after update
Previously the app supported the iPhone 5s/SE screen and iPhone 6-8 screens (not the plus sizes), this was done using launch images. So on Plus sized devices and iPhone X* devices it would display ...
8
votes
2
answers
2k
views
Converting dp to px without Context
There is a very neat way of converting dp to px without Context, and it goes like this:
public static int dpToPx(int dp) {
float density = Resources.getSystem().getDisplayMetrics().density;
...
8
votes
6
answers
14k
views
Physical screen size 'detection' based off user agent in PHP/javascript
So, there are ways to detect 'mobile' browsers and screen sizes using javascript and php.. however, the screen size is always returned in pixels and mobile can mean anything these days.
I want to be ...
8
votes
2
answers
2k
views
Get the correct screen display size on Galaxy S8
In my app I am currently using windowManager.getDefaultDisplay() to determine the screen size.
With the new Samsung S8 navigation bar, that can be shown and hidden using a 'dot' on the bottom left, I ...
7
votes
4
answers
10k
views
Getting the physical screen size in inches for iPhone
How can I get the screen size programmatically in inches(for example iPhone 4, 3.5 inches).
I found a way to do it by detecting the iPhone/iPad model but hard coding is not what I want so I am not ...
7
votes
4
answers
25k
views
Best way to detect mobile device and redirect
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 ...
7
votes
1
answer
7k
views
Smallest Width for Galaxy S and Galaxy S2
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 ...
7
votes
2
answers
1k
views
Multiple MODAL VIEW controller change base modal to FULL SCREEN after ROTATION
This has been troubling me for quite a while, and I have done so much research on this, but could't find an answer. My first time posting a question here, please correct/forgive me if I make a mistake....
7
votes
1
answer
4k
views
What is range for android:largeScreens?
As per the above image, large screen size will have range of 4" to 7".
So all the android devices which have 4" to 7" display size they all belongs to large screen size.
It may chance 7" tablet also ...
7
votes
2
answers
644
views
What is Error:screenSize" />?
I am getting this error on installing and launching the app, but it does not effect working of my app. But still why am I getting this :
Error:screenSize" />