screen

Screen Support in Android 3.2 (API level 13)

安稳与你 提交于 2019-12-05 15:40:42
According to the note written in this documentation ( DeclaringTabletLayouts ), the old groups was deprecated (small, normal, large, and xlarge), which is why we have to migrate to the new technique defined in Android 3.2. Note: Beginning with Android 3.2 (API level 13), these size groups are deprecated in favor of a new technique for managing screen sizes based on the available screen width. If you're developing for Android 3.2 and greater, see Declaring Tablet Layouts for Android 3.2 for more information. How do we make different layouts for small vs normal vs large screens with the new

Change the background color of dosbox console when executing a tasm program

纵饮孤独 提交于 2019-12-05 15:36:46
I am trying to display x in the center of the screen and then change the background color of the console to blue. I have the following code that accomplishes everything except for changing the background color: TITLE screen1.ASM .MODEL SMALL .STACK 0100h .DATA .CODE start: MOV AX,@DATA MOV DS,AX MOV AX,0600h MOV BH,07h MOV CX,0000h MOV DX,184Fh INT 10h MOV AH,02h MOV BH,00h MOV DH,0Ch MOV DL,28h INT 10h MOV AH,02h MOV DL,'x' INT 21h MOV AX,4C00h INT 21h END start The code clears the screen, displays x at the center of the dosbox window and gives control back to DOS. I'm trying to find out what

Start activity when screen is off

蓝咒 提交于 2019-12-05 15:07:09
I have set up an AlarmManager to start up an activity. This activity also plays a sound, similar to an alarm app or an incoming call. It works ok if the screen is on, even if the screen is locked. If the screen is off, it doesn't work at all. I tried using the following as the first thing in onCreate getWindow().setFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); If the screenlock is not enabled, this turns on the screen and I can see my activity closing. I can't hear the sound playing. If the screenlock is enabled, the screen won't turn on

Android: Turn off screen from a service

旧巷老猫 提交于 2019-12-05 13:11:57
I am trying to figure out how to turn off the screen from within a service. I have already read this but I am failing to realize how to do this from within a service. I don't really want to deal with wake locks because as soon as the screen goes off, I don't really care about turning it back via java code. I just need a one time method for turning the screen off and I have searched forever on this. I see two options: (1) Create a dummy Activity and use it to get a Window object through the getWindow(); method. Then you would use an Intent to call the screen off from your Service . (2) Use

Is it possible to capture video of an iPod without jailbreaking? Is it possible to add code snippets to my App to send video data to AirServer? [closed]

心不动则不痛 提交于 2019-12-05 12:34:36
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I found this post that suggests to use AirServer to capture video from iPhone. Unfortunately AirServer doesn't support iPods (even though I have a 4th gen iPod running iOS 5.0). Is there a way via software or should I get my iPod to connect to a TV and record it there? I have seen that there are some good cables to connect iPod to TV but I lost the link and now can find only suggestion that explains how to do it

Turn screen on and off programatically in android

余生颓废 提交于 2019-12-05 12:27:10
I want to turn screen ON and OFF based on the proximity sensor. I am able to turn the screen off. but the code to ON the screen back is not working. Can anyone help me please? This is the code:` public void onSensorChanged(SensorEvent event) { if (event.values[0] == 0) { Toast.makeText(getApplicationContext(), "sensor in 0",Toast.LENGTH_LONG).show(); WindowManager.LayoutParams params = getWindow().getAttributes(); params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON; params.screenBrightness = 0; getWindow().setAttributes(params); } else { Toast.makeText(getApplicationContext(), "sensor in 1",Toast

How can I wake an android device up and skip the screenlock

落花浮王杯 提交于 2019-12-05 11:07:10
As title, is it possible for me to wake my phone up and skip the screenlock? I want to write an app based on the alarm clock, when it's time, the app should do detect something in the background even when the phone is sleeping. When something is detected, the phone should automatically wake up, skip the screenlock, and show a picture(start a new activity ). Can anybody give me some suggestions or examples on these? Thanks a lot! The activity you're starting needs one or both of the following layout parameters. Use FLAG_SHOW_WHEN_LOCKED so that the activity appears above the screenlock. Use

How to get USABLE screen width and height in Android

微笑、不失礼 提交于 2019-12-05 10:21:35
I'm creating an app where I really need to know the correct screen dimensions. Actually I know how to do that... but a problem appeared, because even if you do requestWindowFeature(Window.FEATURE_NO_TITLE); , this: still stays on the screen and it seems, it's also counted as a part of the screen so the "screenWidth" is actually bigger, than the usable part. Isn't there any method how to get the size of the usable part and not whole screen? Or at least get the sizes of the 'scrolling thing'(but there would be a problem, that there are devices that don't show them)? I had the same question a

Handle UI in all iPhones with different scaling/resolutions [duplicate]

巧了我就是萌 提交于 2019-12-05 09:40:10
This question already has an answer here : Make iOS application compatible with iPhone6 and iPhone6+ sizes [closed] (1 answer) Closed 5 years ago . What is the best approach to handle iPhone4, iPhone5, iPhone6, iPhone6+ UI Screens in iOS? Size for iPhone 6+ with @3x scaling, Coordinate space: 414 x 736 pixels Size for iPhone 6 with @2x scaling, Coordinate space: 375 x 667 pixels I think this question is already answered here You just need to use new Xcode 6 Gold master and it will scale your screen for both new sizes. With that their are several new options in new Xcode 6 if you creating new

screen support multiple devices using layout-large,layout-normal and layout-xlarge folders

一笑奈何 提交于 2019-12-05 07:50:19
I created layout-large , layout-normal and layout-xlarge in the res folder and I copied all the xml files to those layout folders First, I want to ask what is the difference between layout (the default ) and layout-normal folder? I know if I run the application on big screen size the app will take the xml files from layout-xlarge . So I made all the elements in layout-xlarge look as I want using FrameLayout in tap2 10.1 , but when I run it in note2 or s3 mobile it looks different because the screen size is not same . So how can I make the the application run in tap2 10.1 (1,280 x 800) and