键盘消失,当方向改变为横向模式 [英] keyboard disappears while orientation change to landscape mode

查看:165
本文介绍了键盘消失,当方向改变为横向模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序能够在 focusChangeListener 的EditText 方向改变。

I am enabling orientation change in focusChangeListener of an edittext in my app.

它工作正常,但问题是,如果用户翻转键盘以横向模式键盘消失。

It is working fine, but the issue is if the user flips the keyboard to landscape mode keyboard disappears.

这将拿出仅当的EditText 用户水龙头再次或更改方向为纵向模式。

It will come up only if user tap on edittext again or change orientation to portrait mode.

我需要不碰,显示键盘在横向模式下的的EditText

I need to display keyboard in landscape mode without touching the edittext.

请帮我。

推荐答案

一般情况下,它的一个坏主意,乱用默认输入法的行为,因为有设备在那里与硬件键盘。

Generally, its a bad idea to mess with the default IME behavior because there are devices out there with hardware keyboards.

现在,你已经被警告,监听方向变化,如果键盘是更改前可见并没有硬件键盘的设备上,手动显示键盘。

Now, that you have been warned, listen for the orientation change and if the keyboard was visible before the change and there is no hardware keyboard on the device, show the keyboard manually.

这篇关于键盘消失,当方向改变为横向模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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