简体   繁体   English

android软键盘覆盖EditText聚焦

[英]android soft keyboard cover the EditText focused

1.put edittext to bottom of screen,set EditText's gravity to right, inputtype to something like number. 1.将edittext放在屏幕底部,将EditText的重力设置为右,输入类型为数字。 2.click the edittext, soft keyboard willl show and edittext will be push up. 2.单击edittext,将显示软键盘,并按下edittext。 3.press hardware back to hide keyboard. 3.按回硬件以隐藏键盘。 4.click edittext again, keyboard will show but edittext is covered by keyboard. 4.再次单击edittext,将显示键盘,但键盘覆盖了edittext。

Did someone get this issue too? 有人也收到这个问题吗?

put all components inside the scrollview. 将所有组件放入scrollview中。

<RootView>
   <ScrollView>
     <childview>
      .
      .
      <your other views>
      .
      .
     </childview>
   </ScrollView>
</RootView>

then add android:windowSoftInputMode="stateHidden|adjustResize" in your manifest to the corresponding activity. 然后在清单中将android:windowSoftInputMode="stateHidden|adjustResize"添加到相应的活动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM