Skip to main content

LWUIT allow landscape on TextArea only - use portrait for everything else

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2008-04-28

Hi all,

I have been searchig the forum for an answer on this but haven't found one so, here I go.

My team is working on a project that needs the orientation to stay in "portrait" mode but let the user move the phone to the "landscape" position only when text input is needed.

So, the idea is, the app remains in portrait mode until the user needs to input some text. We're using LWUIT's TextArea component for this so we thought there was a possibility to lock LWUIT to portrait and only use landscape for the native Textbox implementation when it shows up, but we're finding it difficult to prevent LWUIT from switching orientation.

Our target handsets are Nokia touchscreen devices (S60 5th edition), so the "Nokia-MIDlet-App-Orientation: portrait" JAD attribute pretty much did the trick except for the native keyboard not being displayed in landscape orientation this way - which is exactly what we need to do: 1) show the app in portrait at all times 2) allow the native keyboard as implemented by native TextBox implementation to be shown in landscape when text input is required.

Any ideas are apprecitated!

Thanks in advance


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07

This is a limitation of all MIDP devices since MIDP has no notion of landscape/portrait orientations. LWUIT's trunk SVN supports this to some degree on RIM/Android devices but we will never be able to support this on MIDP due to the lack of an API for that.