如何移动布局,最多的时候软键盘显示的android最多、布局、键盘、时候

2023-09-05 06:01:36 作者:丢了樱桃的小丸子

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

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

 
精彩推荐
图片推荐