android中的EditText,adjustPan,ScrollView问题

时间:2014-01-30 06:13:11

标签: android android-edittext scrollview adjustpan

我有一个EditText,它包含在ScrollView中,但是当键盘出现时。

您无法向下滚动到现在涵盖的字段。我尝试在清单和课程中添加adjustSizeadjustPan

但它不起作用..

4 个答案:

答案 0 :(得分:13)

我遇到了同样的问题,我找到了解决办法。所以,也许它会帮助你。

请将以下属性提供给ScrollView标记:

android:isScrollContainer="false"

在您的活动中表现为:

android:windowSoftInputMode="adjustPan"

答案 1 :(得分:7)

在活动标签内的清单文件中使用

android:windowSoftInputMode="adjustResize|stateVisible|stateAlwaysHidden" 

答案 2 :(得分:1)

您只需在滚动视图中添加此行 android:isScrollContainer =“ true”

喜欢这样的东西

 <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:isScrollContainer="true"
        android:scrollbars="none">

答案 3 :(得分:0)

仅仅花了3个小时来解决这个问题。

对我有用的是从清单中的windowSoftInputMode中删除“ adjustPan”。

所以我从:

android:windowSoftInputMode="adjustResize|adjustPan|stateHidden"

收件人:

android:windowSoftInputMode="adjustResize|stateHidden"

它为我解决了所有问题。

我希望这也会对其他偶然发现的人有所帮助。有趣的是,在我的其他屏幕上,不管adjustPan还是一样。