如何打开只有一半的键盘在横向模式? [英] How to open only half keyboard in Landscape mode?

查看:602
本文介绍了如何打开只有一半的键盘在横向模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个Android打字的游戏。我真的希望这个游戏工作风景模式,因为,在我看来,这是更具体的Andr​​oid游戏。

I want to develop an Android typing based game. I would really want this game to work on landscape mode, because, in my opinion, it is more specific Android games.

在那里,它是这样一个问题。

There it is this first problem

如果我切换横屏模式,当用户打开键盘,他无法看到屏幕的其余部分,因为在横向模式下它打开全屏。 (我的键盘做到这一点)

if I toggle landscape mode, when the user opens the keyboard he can not see the rest of the screen because in Landscape Mode it opens Full Screen. (my keyboard does this)

问题:有什么办法,我可以在横向模式下打开只有一半的键盘,使用户可以看到他在那里打字或有没有人找到另一种方式来解决这个问题

Question: Is there any way in which I can open only half keyboard in Landscape Mode so that the user can see what where he is typing or does anyone find another way to solve this problem?

非常感谢你!

推荐答案

添加这样的:

android:imeOptions="flagNoExtractUi"

您的EditText节点(在XML)将让这个键盘弹出一半在屏幕上,让你编辑文本就在文本字段(在UI),而不是在自己的(全屏)文本编辑区。

to your EditText node (in the xml) will make it so that the keyboard pops up on half the screen and lets you edit the text right IN the text field (in your UI) rather than in its own (full screen) text edit area.

我刚刚测试了这个在Galaxy Nexus的(运行ICS)和RAZR Maxx的(运行姜饼),应用程序被编译为midSdk 10(2.3.3)。它似乎工作

I've just tested this in a Galaxy Nexus (running ICS) and a RAZR Maxx (running Gingerbread), the app is compiled for midSdk 10 (2.3.3). It appears to work.

这篇关于如何打开只有一半的键盘在横向模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆