screen

How do you know what you've displayed is completely drawn on screen?

左心房为你撑大大i 提交于 2019-12-22 09:56:19
问题 Displaying images on a computer monitor involves the usage of a graphic API, which dispatches a series of asynchronous calls... and at some given time, put the wanted stuff on the computer screen. But, what if you are interested in knowing the exact CPU time at the point where the required image is fully drawn (and visible to the user)? I really need to grab a CPU timestamp when everything is displayed to relate this point in time to other measurements I take. Without taking account of the

Android: Button at the end of listview OR bottom of screen

妖精的绣舞 提交于 2019-12-22 08:46:51
问题 I have a requirement for my android application that a button is at the bottom end of the list. That is done on purpose so users have to scroll trough the entire list (and possibly see more answers). Therefore I added the button as a listview footer. This all works fine but in some cases the list is too short (only 3-4 items in it) so the button will end up about midway of the screen. What I would like is that the button is at the end of the listview (so if enough items in the list, the user

Android: Turn screen on and off without locking

寵の児 提交于 2019-12-22 08:35:01
问题 I need to turn the screen off and on like when you are doing a call and holding the phone to your ear. The screen then turns off but it isn't locked or anything, it's just black. What is the best way to do that? I don't want to show a black fullscreen activity if there is another solution...:) 回答1: There are two methods for doing that, PowerManager manager = (PowerManager) getSystemService(Context.POWER_SERVICE); // method 1 manager.goToSleep(int amountOfTime); // method 2 PowerManager

Change body width using javascript

心不动则不痛 提交于 2019-12-22 08:33:55
问题 I just came to know that we can find out the screen resolution of our users using screen.width and screen.height etc. But is there any way to have a variable body width. I mean can i set the body width property using jquery or javascript. This is gonna change with the resolution of every user so that my site seems perfect in all of them... Can anyone help me in having code to set the width(CSS) of my page according to the value obtained through Jscript above. Thanks 回答1: You can set the body

How to get current screen details in javafx?

╄→гoц情女王★ 提交于 2019-12-22 04:40:34
问题 I have multiple monitor connected with my PC. From javaFX I can get primary screen. But I need to know about the screen details of the screen the stage currently is. How can I get that? 回答1: Try to use getScreensForRectangle with the x, y, width and height of your window. 来源: https://stackoverflow.com/questions/20176340/how-to-get-current-screen-details-in-javafx

Android layout on emulator vs device

安稳与你 提交于 2019-12-22 01:43:22
问题 I've created my app using all the neccessary things to support different screen sizes/densities (relative layouts, dip etc.) I've created all the neccessary layout files (ldpi,mdpi etc) and images for this support. I've tested the app on all the available emulator skins using Eclipse, and they all appear like the should. I then tested this on a real device (Samsung Galaxy SII) and it looked great. Then I tested it on a Galaxy Tab (7") and the layouts were a bit wrong, and the text sizes were

Dialog creation in Blackberry

有些话、适合烂在心里 提交于 2019-12-21 22:26:52
问题 Hi, I want to create a Login Screen which has a Username and Password and a Sign in Button But when a user fails to enter correct information inside the TextField of Username or Password a pop up like the image chat dialog should pop up from corner of TextField's right side displaying appropriate message How can this Customization be achieved? 回答1: i am giving you a simple way. If it is not perfect to your question you just ignore this answer. Here i made logic like following. i gave you two

winapi change brightness

若如初见. 提交于 2019-12-21 20:23:34
问题 What winapi's are there to change the screen's brightness? I've been attempting to look for an example or API I can use for Delphi but have not found anything. 回答1: Starting with Windows Vista you can use the GetMonitorBrightness and SetMonitorBrightness functions. function GetMonitorBrightness( hMonitor : THandle; var pdwMinimumBrightness : DWORD; var pdwCurrentBrightness : DWORD; var pdwMaximumBrightness : DWORD ) : BOOL; stdcall ; external 'Dxva2.dll' name 'GetMonitorBrightness'; function

How to dim/blur only part of the screen?

流过昼夜 提交于 2019-12-21 12:12:40
问题 I know we can dim/blur the screen, as shown on this post. What should I do in order to dim/blur only a part of it, leaving a single (or multiple) view without any effect, so that the entire screen will have an effect of a highlighted view? Also, will it work even if I make a dialog on top of the current screen, so that the dialog and the highlighted view will remain without any effect? 回答1: I think Showcase View Might be helpful for you. The ShowcaseView library is designed to highlight and

Keep screen on in Activity - does not work with FLAG_KEEP_SCREEN_ON

人走茶凉 提交于 2019-12-21 10:15:12
问题 So, for a long time I thought that I knew how to stop the screen from going into sleep mode, I simply used this code in my Activity: getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); However, I realized that this only worked when my phone was in "developer mode", ie when the usb debugging (Settings --> Developer options --> USB debugging) was enabled/checked. Then the above codes indeed stops the screen/device to go to sleep. When that debugging is not checked, then my