screen

How get height of title screen on blackberry screen?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 08:53:25
问题 Why getHeight after setTitle equal null? How do I get the actual height value? public class ActivityScreen extends MainScreen { /** * Creates new instance Activity screen */ public ActivityScreen() { super(); TitleFieldManager titleField = new TitleFieldManager(Display.getWidth()); super.setTitle(titleField); if (titleField.getHeight() == 0) { // Why titleField.getHeight() == 0 ? } } } 回答1: Because you are calling titleField.getHeight() in the screen's constructor. At this point the UI

what's the difference between the sum of a screens WorkingArea and it's Bounds

巧了我就是萌 提交于 2019-12-11 07:35:16
问题 In the .NET, what is the difference between myScreen.WorkingArea.Left + myScreen.WorkingArea.Right and myscreen.Bounds 回答1: Working Area: Gets the working area of the display. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. Bounds: Gets the bounds of the display. So, in the first instance you're working with actual space, while in the second visual space. 回答2: WorkingArea excludes Taskbar (and a few other thinds. see msdn). Bounds

Application turns black when dragged from a 4k monitor to a FullHD monitor

不打扰是莪最后的温柔 提交于 2019-12-11 06:45:22
问题 My notebook has a 4k display. My external monitor is 1920. When I drag my Java Swing app window from the 4k display onto the external monitor it gets completely black except for the window frame. It doesn't matter whether I maximize it on the external monitor or not. Here is the HelloWorldSwing example I got from Oracle.com. It shows the exact same behaviour. import javax.swing.*; public class HelloWorldSwing { /** * Create the GUI and show it. For thread safety, * this method should be

iOS Screen Capture is blurry

笑着哭i 提交于 2019-12-11 06:36:20
问题 I am having trouble getting a screen shot that is not blurry - first I tried this: Screen capture for iOS and it was not blurry but I think Apple will not let this code through - won't make the review? so I went with the official solution in the developer docs: similar to this: Capturing Screen But when I use the 'official' way, the image it creates is blurry Here is the code I am using straight from the dev support docs (iOS6 and I am scaling it, but there is no difference if scale is 0):

Android: Orientation Change Based On Screen Size

只愿长相守 提交于 2019-12-11 05:24:13
问题 I need certain activities of mine to only change to landscape if the screen is big enough. This means tablets and phones with screen size 5.1in+. Is there anyway to do this through overriding onConfigurationChanged(...) and using the XML statement: android:configChanges="orientation" 回答1: You certainly can. You can sniff for the screen size and using an if statement if binary or a switch otherwise to set the orientation of the view manually: Display d = ((WindowManager) getSystemService

Flash builder Mobile AS3 project: Screen DPI, Application DPI, image DPI, center image

有些话、适合烂在心里 提交于 2019-12-11 04:52:02
问题 I wrote a Flash Builder project in AS3. It uses some images to tell the user that it is busy with something. In the first place I wanted to use the SVG file format for these images to keep it crisp as possible. But it doesn't work, errors in shapes or not on the right position. So I decide to use the PNG format. It is working nicely except for one thing: DPI translations done by the compiler. I cannot center the image because the DPI size is recalculated to the size of the screen's DPI and

Xamarin : Splash screen using a Layout

北战南征 提交于 2019-12-11 02:43:17
问题 I am trying to create splash screen for my android application, as shown in this link http://developer.xamarin.com/guides/android/user_interface/creating_a_splash_screen/ Unfortunately this link just shows how to make a splash screen using a drawable. But what I need to do is to create a splash screen using a Layout so that I can easily customize how it looks and make it compatible with different screen sizes. Thanks 回答1: What you can do is to create a Activity that represents your splash

How to change default picture application to my own picture?

吃可爱长大的小学妹 提交于 2019-12-11 02:38:20
问题 When I run my application, it's automatically create a droid-bot picture on surface of application. So, I want to change a picture, what should I do? 回答1: (1) create a PNG image (say icon.png) and save it in the folder: res/drawable (2) Then, in AndroidManifest.xml of your application add the icon tag in your application: android:icon=”@drawable/icon” e.g. <application android:name ="yourAppMgr" android:icon="@drawable/icon" //... > 回答2: AFAIK you can't change the icon of installed

Android get Lock Timeout Programmatically

吃可爱长大的小学妹 提交于 2019-12-11 02:22:24
问题 I am writing an app to show an activity over the lock screen when the phone is locked and screen off. When the user leave the activity, the keyguard should be shown. The common way to detect whether the phone is locked by by receiver and ACTION.SCREEN_OFF. It works perfectly if the user press lock button the lock and screen off the phone. However, after ICS, the phone may not be locked as soon as the phone is screen off. So, how can I get the lock event or how can I get the value of

How to get screen resolution in ruby

时光毁灭记忆、已成空白 提交于 2019-12-11 02:07:29
问题 How to get screen resolution (height, width) in ruby script? 回答1: On Linux: x, y = `xrandr`.scan(/current (\d+) x (\d+)/).flatten On windows, use WIN32OLE and such. 回答2: Ruby has no notion of a GUI. You would need to use somethign like the Ruby Xlib Wrapper for this. 回答3: This is how I solved my problem of getting resolution. As I was using Ruby 2.3.0, I cannot use DL module(as its been depricated). Following is by using Fiddle usr32=Fiddle::dlopen("user32") gsm=Fiddle::Function.new(usr32[