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
27
votes
1 answer

Creating an emulator for Galaxy S8? - Android Studio

I create a new hardware profile in an attempt to make and emulator for the Galaxy S8/S8+. I set the screen size to 5.8/6.2 inches (depending on whether S8 or S8+, despite the fact this doesn't appear to affect emulator anyway), and the screen…
4u53r
  • 717
  • 1
  • 7
  • 17
27
votes
8 answers

Screen Resolution Problem In WPF?

I'm gonna detect the resolution with the following code in WPF : double height = System.Windows.SystemParameters.PrimaryScreenHeight; double width = System.Windows.SystemParameters.PrimaryScreenWidth; Current resolution of my screen is 1920*1200,…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
27
votes
4 answers

Turn off screen programmatically when face is close the screen on Android

My app is a dialer and when user holding the phone near his head I need to turn screen off and prevent clicking on the controls - like native Android dialer behavior. What API level I need and how can I do this in right way?
Solkin
  • 906
  • 1
  • 9
  • 16
26
votes
5 answers

Correct method for setKeepScreenOn / FLAG_KEEP_SCREEN_ON

I am using the method setKeepScreenOn(true) and haven't been able to figure out how to call this in relation to the current Activity (which has a content view set). I've been able to get it to work by calling it on one of my buttons which is always…
Emma Assin
  • 851
  • 2
  • 12
  • 23
26
votes
3 answers

Redshift toggles on and off (flickering)

I installed redshift on ubuntu 16.04 to reduce blue light. However, when I turn it on, it toggles on and off every 1-2 seconds continuously. I ran it in verbose mode (redshift -v) and this is the output: Temperatures: 3500K at day, 3500K at…
Bob
  • 513
  • 1
  • 5
  • 14
26
votes
7 answers

Set background image according to screen resolution

I would like to be able to change my webpage background image according to the screen resolution the user uses so: if screen resolution is greater than or equal to 1200*600 then background = mybackground.jpg no-repeat or else. How can I do this?
prakasam
  • 253
  • 1
  • 3
  • 12
25
votes
4 answers

Getting actual screen dpi/ppi under windows

I would like to get the actual screen dpi/ppi, not the dpi setting used for font in C++. I tried with the following codes: Version 1, reports 72 dpi, which is wrong. SetProcessDPIAware(); //true HDC screen = GetDC(NULL); double hSize =…
Andy Li
  • 5,894
  • 6
  • 37
  • 47
24
votes
8 answers

Screen orientation and values in manifest.xml

I want to use all activities in my form in landscape or portrait. When user select orientation - this is valid for all activities. Tried with "behind" option orientation. According to Google - orientation will depend on previous activity. My first…
Kostadin
  • 2,499
  • 5
  • 34
  • 58
24
votes
7 answers

How can you make the form maximize to any computer screen in a Windows Forms application?

So I am making a game on Visual Studio C# and I want the form to be automatically maximized to any user's computer screen when compiled? How can I do that?
George Tyler
23
votes
7 answers

How to check if my activity is the current activity running in the screen

I used Toast to make notification, but it seems it will appear even its activity is not in the current screen and some other activity has been started. I want to check this situation, when the activity is not the current one, I'd not send the Toast…
virsir
  • 15,159
  • 25
  • 75
  • 109
22
votes
2 answers

How to disable Toast Messages generated in Screen Pinning?

i'm developing lockscreen application, and i want to disable home button, my app is - Device Owner and Device Administrator now i'm usnig screen pinning for disable home button. but if i started activity each time i get msg "Screen pinned" and on…
Sangha_development
  • 253
  • 1
  • 4
  • 9
22
votes
3 answers

How to transform 2D world to screen coordinates OpenGL

I'm currently working on implementing an OpenGL powered renderer into a 2D game engine. Because the OpenGL screen coordinate space is [-1,1], I'm a little confused as to how it should be interfaced with a generic, Cartesian 2D world coordinate…
bgroenks
  • 1,859
  • 5
  • 34
  • 63
21
votes
2 answers

XNA - Get Current Screen Resolution

Is it possible to get the current desktop screen resolution? I have a few minor settings in my XNA game one of which is screen resolution. What I want to do is blank out a screen resolution option if it is larger than the current desktop resolution…
Jpin
  • 1,527
  • 5
  • 18
  • 27
21
votes
4 answers

What happens if I leave all of my images in the drawable-hdpi folder?

I have all of my images in the drawable-hdpi folder. And I finished all of my layouts for all screen sizes. But i forgot to put the images in the drawable-mdpi folder and drawable-ldpi folder. If a phone with an mdpi screen density were to…
GabeDroid
  • 677
  • 1
  • 9
  • 13
21
votes
4 answers

Problems understanding the life cycle when screen goes off and on

Information: My device is a Nexus One with 2.2 and I have tested two projects, one on 1.5 and one on 2.1. Problem: I have trouble to understand the life cycle of my application when the screen is turned off and on. Here is my output // activity…
WarrenFaith
  • 57,492
  • 25
  • 134
  • 150