[英]Android Scrollview doesn't scroll when keyboard appears onClick of EditText
I've been through n number of solutions for this problem and tried them all but nothing helped. 我已经通过过多种解决方案来解决此问题,并尝试了所有方法,但无济于事。 I have an EditText
and onClick
of it, a custom keyboard appears but the EditText
doesn't comes up above the keyboard. 我有一个EditText
和onClick
,出现了一个自定义键盘,但是EditText
不在键盘上方。
I have tried putting: 我试着把:
android:windowSoftInputMode="stateAlwaysHidden|adjustPan|adjustResize"
in my Manifest file. 在我的清单文件中。 I read somewhere that its a bug and it does not work in FULLSCREEN mode so I removed fullscreen mode from my manifest. 我在某处读到它是一个错误,并且在FULLSCREEN模式下不起作用,因此我从清单中删除了全屏模式。 Again didn't work. 再次没有用。 Please help scrolling my EditText up :D 请帮助向上滚动我的EditText:D
PS: Please don't answer for android's default keyboard. PS:请不要回答android的默认键盘。 I am using my own custom keyboard. 我正在使用自己的自定义键盘。
In scrollView use the following code: 在scrollView中,使用以下代码:
in XML:
android:fillViewport="true"
OR 要么
in Java:
setFillViewport(true);
You have to use a translate animation , to move the Edit-text or the entire view above the keyboard along with the Y-axis . 您必须使用平移动画来将“编辑文本”或整个视图与Y轴一起移到键盘上方。
As you are using a custom keyboard,no other way seems to be possible. 当您使用自定义键盘时,似乎没有其他方法可以使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.