0

It is possible to set the orientation of the keyboard in landscape mode to portrait? My activity is always in landscape mode, but if the keyboar appears only the keyboard should be in a portrait mode.

1 Answers1

1

No, sorry, the input method editor will be in whatever orientation your activity is. If you want users to be able to type in portrait mode, allow the activity to change orientation.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • this is very unfortunate, in my app I need to play a movie (in landscape as android cannot play in portrait) and have a chat in same activity. Having vertically oriented edittext is affordable but keyboard is in landscape and closes most of the screen. Any ideas how to fight this? Having a chat in separate activity is not a case due to number of reasons. – Cynichniy Bandera Apr 17 '13 at 19:21
  • @Umka: What makes you think that Android cannot play a movie in portrait mode? – CommonsWare Apr 17 '13 at 19:28
  • Well, I tried everything I could find, red every single article about this on stack overflow. The only one thing left is to look at surfaceview source :) Video is produced in landscape, hinted to be in portrait but players don't care. All say, just switch activity to landscape this is the only way. If you help me with this one, well I'm even ready to pay or what else I can do to say big "thanks!" – Cynichniy Bandera Apr 17 '13 at 19:35
  • Let me be more precise about the video format. Its created on iphone or android holding the device in portrait. It should be played in portrait too. My impression is that, hardware just generates it in landscape all the time. – Cynichniy Bandera Apr 17 '13 at 19:39
  • @Umka: "the only one thing left is to look at surfaceview source" -- I feel fairly confident that `SurfaceView` is not related to your problems. "but players don't care" -- you are the one who is writing the player. https://github.com/commonsguy/cw-omnibus/tree/master/Media/Video <-- that app has played video successfully in portrait for nearly five years, and I just tested it now, and it still plays video successfully in portrait. – CommonsWare Apr 17 '13 at 19:40
  • well... it does not work ) should I put a screenshot somewhere? – Cynichniy Bandera Apr 17 '13 at 20:16
  • @Umka: The test video for the sample app can be downloaded from http://commonsware.com/misc/test.mp4. Try it with the test video. If you run into problems, there are issues with your device. If the test video works, your problems lie with your video. – CommonsWare Apr 17 '13 at 20:23
  • In two words, the problem is that, orientation of video is orientation of the device is always different. This means I need to fake ui elements orientation. Labels are ok to make vertical. buttons, etc., but not the keyboard. – Cynichniy Bandera Apr 17 '13 at 20:36
  • @Umka: It renders the same on Android as it does on my Ubuntu Linux box (using Movie Player, VLC, and PiTiVi). "My video is oriented in landscape and only tagged as "one that should be played in portrait"" -- so, you admit that your video is broken. **Fix the video**. There are plenty of tools available for doing so. Here are instructions for doing this using `ffmpeg`: http://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg If you have further questions on this topic, start a new SO question. – CommonsWare Apr 17 '13 at 20:51
  • Thanks for your suggestions but fixing video is the case in this situation ) – Cynichniy Bandera Apr 17 '13 at 21:12