screen

Android: Screen capturing without root

大兔子大兔子 提交于 2019-12-08 10:04:25
问题 I tried below code but as I run it gives a black screen image on android mobile and on emulator it gives a file, by opening this file I get message as preview not available . View v = activity.getWindow().getDecorView(); v.setDrawingCacheEnabled(true); v.destroyDrawingCache(); int width = activity.getWindowManager().getDefaultDisplay().getWidth(); int height = activity.getWindowManager().getDefaultDisplay().getHeight(); v.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),

Android 2.2: Turning of screen under certain times of the day by code

情到浓时终转凉″ 提交于 2019-12-08 07:06:31
I would like to know if there is any way to turn off the screen on an android device on for example 19.00-22.00 every day. I have some tablets running in kiosk mode, and i want the screens to turn off when no one is using them and the store is closed. Thanks Screens will turn off automatically, if you have that set up properly in the device settings. You can use AlarmManager and a WakeLock to arrange to keep the device screen awake during business hours. Have the AlarmManager start up a service that acquires the WakeLock and waits until closing time. You will need to use startForeground() in

Code Only Produces Black Screen In Pygame Window

一个人想着一个人 提交于 2019-12-08 05:46:21
问题 I followed a tutorial and copied the code exactly, though it only produces a pygame window with a black screen. Here is the link to the code(exactly as i typed it out): http://www.dreamincode.net/forums/topic/83308-introduction-to-pygame-part-1/ It is correct as in the tutorial, yet does not work. I am using python 3.3.2 and pygame-1.9.2a0.win32-py3.3.msi. 来源: https://stackoverflow.com/questions/17767315/code-only-produces-black-screen-in-pygame-window

Android 2.2: Turning of screen under certain times of the day by code

耗尽温柔 提交于 2019-12-08 05:35:59
问题 I would like to know if there is any way to turn off the screen on an android device on for example 19.00-22.00 every day. I have some tablets running in kiosk mode, and i want the screens to turn off when no one is using them and the store is closed. Thanks 回答1: Screens will turn off automatically, if you have that set up properly in the device settings. You can use AlarmManager and a WakeLock to arrange to keep the device screen awake during business hours. Have the AlarmManager start up a

Device specific screen capturing on android

时光总嘲笑我的痴心妄想 提交于 2019-12-08 05:08:23
问题 We need to find a way to capture Android screen, without using any external software, which will work on a non-rooted phone. My research shows that there is no way to do that. In any way, you should have root permissions, to be able to capture device's screen. Further research, however, shows, that there is a way for limited number of devices, to do that, without having root privileges. As a proof I can bring following application on Android market: Screenshot UX. It claims, that app doesn't

Android handle orientation change w/o rotating screen

会有一股神秘感。 提交于 2019-12-08 04:04:00
问题 How to handle screen orientation without rotating screen? I have override onConfigurationChanged in my activity and try to comment out call super.onConfigurationChanged and my application Force Closes. Next thing I've tried was to set orientation attribute in newConfig parameter of this method to newConfig.orientation = Configuration.ORIENTATION_PORTRAIT; before call super.onConfigurationChanged . But still my screen has rotated. My last implementation would be to handle sensor (gyroscope)

Unresponsive screen on iPhone 5, iOS 6 Simulator

孤人 提交于 2019-12-08 03:10:33
问题 I have added a Default-568h@2x.png to my app and it looks fine on Retina 4 inch simulator. However there is about 170 pixel area on the bottom of the screen where no response to tapping and/or touching. Do you have the same problem? Any idea how to solve this? 回答1: Assuming you are using MainWindow.nib, click the root VC and select "full screen at launch". Alternatively, in -applicationDidFinishLaunching:withOptions: window.frame = [UIScreen mainScreen].bounds (or window.frame = window.screen

Android Screen support for Samsung S4 & HTC ONE

会有一股神秘感。 提交于 2019-12-08 02:29:26
问题 I've been browing the site for an answer, I followed this: Android manifest config for smartphone only, Sony Xperia Z, HTC One and Samsung Galaxy S4 missing on google play And yet, google Play does not show Samsung S4 & HTC One as supported by my app in my manifest: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16"/> <compatible-screens> <screen android:screenDensity="mdpi" android:screenSize="normal"/> <screen android:screenDensity="hdpi" android:screenSize="normal"/> <screen

Drawer layout with fixed menu item

落花浮王杯 提交于 2019-12-08 00:10:40
问题 We have implemented DrawerLayout which is working fine. However we would like a fixed menu option(logout) that has to be at the bottom of the screen and show up when the drawer opens only. The footer was not an option as it would always shows up as last item in the menu list rather we always want it at the bottom of the menu. We have been able to have a relative layout with the button that is made visible in the onDrawerOpened() but opening of the draw closes that button as the drawer becomes

Memory management when adding a UIImageView to another viewController's view from another viewController's view

这一生的挚爱 提交于 2019-12-07 22:07:21
问题 So it looks like I have no leaks detected throughout my entire project, and I have lots of sections that do various things. However, I found that I am having some allocation issues, proven to me with mark heap in leaks instrument, which have happened most of the time when using the iPad with an external screen. The app is programmed to behave differently when connected to an external screen. I have a zoomable UIScrollView map section that I can go in and out of. When using the iPad by itself,