开发者

Slide in/out event in N97 using J2me

I would like to listen the slide IN/OUT event of the NOKIA devices(Tou开发者_如何学Cch + QWERTY Keyboard) in J2ME App. I need your inputs for the same. Do i need to follow complex implementation or is there any other way around?Will midpjni help?


For handsets with QWERTY and Touch screens, the QWERTY keyboard is exposed when it is slid out and the screen changes to landscape mode (from portrait). So you can detect the sizeChanged(width, height) call, detect that handset went into landscape mode and then handle it.

There is a problem with this approach, if the handset changes into landscape mode based on accelerometer calls then this is inconsistent as then it can go into landscape mode without the QWERTY keyboard being slid out.

So a seemingly good approach is just listen for slide IN/OUT event and handle it. So yours is a good solution. However if your app needs to work on Non-Nokia handsets who dont support slide IN/OUT events.

So, a generic solution would be

  1. Handle portrait/landscape changes based on sizeChanged call.
  2. Make your key handling generic enough to support Virtual keypad and also QWERTY keyboard.

This may have been on tangent but hope it helps you understand this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜