EditText密码输入不会平移窗口

时间:2017-11-29 19:42:04

标签: android android-layout android-edittext

我在LinearLayout中有一些EditTexts,我将inputtype设置为password的是在屏幕的底部,当我点击它并获得焦点时,键盘出现并覆盖它。 当所有EditTexts获得焦点并且键盘出现时,它们会平移屏幕,除了具有输入类型密码的屏幕。我可以在xml中修复它吗? 什么是最简单的解决方案?

1 个答案:

答案 0 :(得分:1)

需要添加此行

      <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait"
            android:theme="@style/MyMaterialTheme"
            android:windowSoftInputMode="adjustPan"
              />

在活动代码

中的清单文件中 像这样:

Collector