J2ME, LWUIT (V. 1.2) - Menu bar from bottom to the right of the screen! - java-me

I'm working with the mobile graphic framework LWUIT (V. 1.2) to develop an application for Nokia N97.
Results are striking and elegant but I have a problem: when I rotate mobile screen, menu bar doesn't switch from bottom to the right of screen. Commands remain on the bottom while correspondent mobile buttons are now on the right...
Is there an event that I can intercept when the user open or rotate mobile screen? Or I have to extend some library class to make this behaviour automatic? Or anithing else?
Anyone of you can describe a solution?
Thanks in advance

I didn't use LWUIT much, but you can insert following parameter to jad:
Nokia-MIDlet-App-Orientation: portrait
This should disable auto-rotating on Nokia S60 5th.
If you want to catch an event when the screen rotates, you can check canvas.getWidth() and canvas.getHeight(). If device's screen is not square, its width and height should change.

Related

How to use "pan screen" on Android Studio?

I have found a function recently in Android Studio named "pan screen". It is located at the right side of design window. But I didn't find any description for it.
If you zoom in your design much enough so it no longer fits on in your design area in Android Studio, you can hit pan icon and drag your design around.
The image you have shown in is Zoom and Pan Controls which allows you to zoom in and out of the design , Now the Pan button will help you to pan around to find the areas
that are unable or not visible to see when zoomed in.
Pan is swing in a horizontal or vertical plane, typically to give a panoramic effect or follow a subject.
Pan in Android studio, you can hold space bar and drag the screen to view those area currently is not visible.
When a user zooms in the layout so much that you are unable to see all items in the layout, you can click on the pan option and then afterwards move the layout without accidently moving the items in the layout.

WPF - Flahing button with a icon on it

How do I place two icons on a WPF button, one in the middle (static icon) and one on the top left (based on a condition)? Also need to Flash the same WPF Button based on a condition?
(While flasing it switches between two background colors, the icons remains same).
Not sure if anyone will want to help you develop super annoying flashing advertising ad style buttons :)
But to point you in the right direction the answer is in learning how to override default control template for the button then for flashing - work on Animation. Once you try that and encounter problems, then post your code and someone will help.
P.S. 'Adam Nathan's WPF Unleashed' is a good start. Good luck!

Android wallpaper also sliding left and right when we swipe the home screen

I want to develop a new home screen application for android. I saw the default home screen in my android 2.3.3 device, when ever I swipe the home screen left and right, the background wallpaper also sliding left and right. What is that view? How to get the same effect in an app?
Is it ViewPager? I checked the ViewPager class, but I didn't found any common background image for all views in that.
You probably want to use a canvas with a draw-able, then detect the users swiping and animate it in the background. It is likely that the default android backgrounds are doing the same. You wont be drawing the unseen portions of the view.
http://developer.android.com/guide/topics/graphics/2d-graphics.html
I suggest doing their lunar lander tutorial to learn how to use the canvas first.
You will make a canvas the background to your app and then lay your other ui elements on top of it unless you make the ui based inside the canvas.

Menu Bar Height in the LWUIT Form

Application develop in the J2ME using LWUIT. When I port this application on the Samsung Device it create the following problem.
int h = Display.getInstance().getDisplayWidth();
It returns 388 for the Samsung GT S5250. So when I draw an image using this dimension it displays a white strip at the bottom of the screen. When I call the Form.show() it displays correctly and height is 400 so how to resolve this issue.
I want to know how the Form size is calculated in LWUIT and how it takes MenuBar Height and white strip display at bottom of the screen.
I think you typed getDisplayWidth() where you meant to type getDisplayHeight().
Regardless, the problem you are seeing is due to a bug in the samsung device. LWUIT invokes the full screen mode in MIDP which hides the native title area, however that doesn't always happen immediately in some devices and thus LWUIT gets incorrect information from the devices. A refresh usually solves this and by the time LWUIT draws on the screen the size is corrected.
Generally the solution is rather simple, create generic code to create your image and if the image dimensions are inappropriate when you are about to draw to the screen then just recreate the image on the fly. This will also solve the issue of device rotation which might pose a problem too.

Is it possible to hide the RootViewController of a SplitView iPad app in landscape mode?

I have an iPad app that uses the RootViewController/DetailViewController pattern like most iPad apps. As usual, in landscape mode my RootViewController is "docked" to the left side of the screen, and the DetailViewController fills up the remainder of the screen.
What I would like to do is hide the RootViewController and allow the detail view to fill up the entire screen even in landscape mode. Is this possible?
I tried calling dismissPopoverAnimated, but this doesn't seem to have any effect in landscape mode.
since u have tagged ios4, I would like to say that that option has been disabled in ios 4.. it was possible in ios 3 but I am not able to find out how...

Resources