Questions tagged [screen]

A screen on a device, such as an iPhone or other smartphone. For questions about GNU Screen (the terminal application for managing multiple windows), use the gnu-screen tag.

A screen on a device, such as an iPhone or another smartphone.

For questions about GNU Screen (the terminal application for managing multiple windows), use the tag.

4773 questions
1960
votes
46 answers

How to get screen dimensions as pixels in Android

I created some custom elements, and I want to programmatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge). Therefore I need to get the screen width and screen height and then set position: int…
Niko Gamulin
  • 66,025
  • 95
  • 221
  • 286
545
votes
18 answers

How to get the screen width and height in iOS?

How can one get the dimensions of the screen in iOS? Currently, I use: lCurrentWidth = self.view.frame.size.width; lCurrentHeight = self.view.frame.size.height; in viewWillAppear: and willAnimateRotationToInterfaceOrientation:duration: The first…
griotspeak
  • 13,022
  • 13
  • 43
  • 54
504
votes
30 answers

How to develop or migrate apps for iPhone 5 screen resolution?

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels). What is required to develop new or transition already existing applications to the new screen size? What should we keep in mind to make applications…
Lukasz
  • 19,816
  • 17
  • 83
  • 139
420
votes
29 answers

Finish all previous activities

My application has the following flow screens : Home->screen 1->screen 2->screen 3->screen 4->screen 5 Now I have a common log out button in each screens (Home/ screen 1 / screen 2 /screen 3/ screen 4 / screen 5) I want that when user clicks on…
Tanmay Mandal
  • 39,873
  • 12
  • 51
  • 48
353
votes
16 answers

Prevent screen rotation on Android

I have one of my activities which I would like to prevent from rotating because I'm starting an AsyncTask, and screen rotation makes it restart. Is there a way to tell this activity "DO NOT ROTATE the screen even if the user is shaking his phone…
Sephy
  • 50,022
  • 30
  • 123
  • 131
324
votes
12 answers

Force "portrait" orientation mode

I'm trying to force the "portrait" mode for my application because my application is absolutely not designed for the "landscape" mode. After reading some forums, I added these lines in my manifest file:
thomaus
  • 6,170
  • 8
  • 45
  • 63
321
votes
10 answers

How to determine device screen size category (small, normal, large, xlarge) using code?

Is there any way to determine the category of screen size of the current device, such as small, normal, large, xlarge? Not the density, but the screen size.
vieux
  • 23,887
  • 3
  • 26
  • 26
302
votes
24 answers

How to detect iPhone 5 (widescreen devices)?

I've just upgraded to Xcode 4.5 GM and found out that you can now apply the '4" Retina' size to your view controller in the storyboard. Now if I want to create an application that runs on both iPhone 4 and 5, of course I have to build every window…
Finn Gaida
  • 4,000
  • 4
  • 20
  • 30
227
votes
11 answers

Android splash screen image sizes to fit all devices

I have a full screen PNG I want to display on splash. Only one error there, and I have no idea what size to put in every drawable folder (ldpi, mdpi, hdpi, and xhdpi). My application is supposed to run good and beautiful on all phones and tablets.…
rel-s
  • 6,108
  • 11
  • 38
  • 50
194
votes
33 answers

How do I get monitor resolution in Python?

What is the simplest way to get monitor resolution (preferably in a tuple)?
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
187
votes
7 answers

How to change size of split screen emacs windows?

I have emacs split horizontally - on top I'm editing Perl code, the bottom is the shell. By default emacs makes the two windows equal in size, but I'd like the shell buffer smaller (maybe half the size?). I was wondering how I could do that.
Steve
  • 1,873
  • 2
  • 12
  • 4
176
votes
24 answers

How to make flutter app responsive according to different screen size?

I am facing difficulties to make it responsive according to various screen sizes. How to make it responsive? @override Widget build(BuildContext context) { return new Container( decoration: new BoxDecoration(color:…
praveen Dp
  • 2,766
  • 4
  • 22
  • 26
163
votes
12 answers

How can I get screen resolution in java?

How can one get the screen resolution (width x height) in pixels? I am using a JFrame and the java swing methods.
AndreDurao
  • 5,600
  • 7
  • 41
  • 61
158
votes
1 answer

how to clear the screen in python

Possible Duplicates: clear terminal in python How to clear python interpreter console? I'm trying to write a program in Python but I don't know how to clear the screen. I use both Windows and Linux and I use commands to clear the screen in those,…
shiester
  • 1,589
  • 2
  • 10
  • 3
152
votes
13 answers

How do I center a window on the screen in C# & WinForms?

I need a way to center the current window on the screen. So for example, if a user pushes a button, I want the window to center itself on the screen. I know you can use the startposition property, but I cannot figure out a way to use that other than…
Sean
  • 8,401
  • 15
  • 40
  • 48
1
2 3
99 100