如何移动布局,最多的时候软键盘显示的android [英] How to move the layout up when the soft keyboard is shown android

查看:111
本文介绍了如何移动布局,最多的时候软键盘显示的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有登录屏幕,两个编辑文本和日志在我的布局按钮的问题是,当我开始输入软键盘显示其隐藏在日志中它下面的按钮。布局出现时如何推高或在键盘上方。

i have log in screen with two edit text and a log in button in my layout the problem is when i start typing the soft keyboard is shown which hides the log in button below it. How to push the layout up or above the keyboard when it appears.

我不希望使用滚动视图,要实现它,而不向下滚动。请建议我做这件事的一些方法。在此先感谢。

i do not want to use a scroll view, want to implement it without scrolling down. please suggest me some way of doing it. thanks in advance.

推荐答案

不知何故,我通过了解软键盘的设备上的状态来实现这一点。我移动布局y位置的键盘示出并移回到原来的位置时,未示出时。这工作正常,随后从http://stackoverflow.com/a/4737265/1063861

i somehow achieved this by knowing the status of the soft keyboard on the device. i move the layout to y position when the keyboard is shown and moved back to its original position when not shown. this works fine, followed the guidelines from http://stackoverflow.com/a/4737265/1063861

这篇关于如何移动布局,最多的时候软键盘显示的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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