我有这个编辑文本:
<EditText android:inputType="textMultiLine|textCapSentences"
android:layout_width="fill_parent"
android:layout_height="240dp"
android:scrollHorizontally="false"
android:imeOptions="actionNone"
android:minLines="9"
android:scrollbars="vertical"
android:singleLine="false"
android:gravity="top"
android:layout_gravity="center_vertical|left"
android:nextFocusForward="@+id/costo_dettagli"
android:layout_weight="1"
android:id="@+id/dettagli"
android:textSize="20sp" />
清单的这一部分:
android:windowSoftInputMode="stateHidden|adjustPan"
问题?当键盘出现时,它位于闪烁的光标下方(换句话说,位于第一行),而不是整个编辑文本下方!
需要在小部件下方放置键盘。
我的所有布局都在滚动视图中,并且我已经尝试了所有 android:windowSoftInputMode
编辑文本问题http://imageshack.com/a/img199/9295/jmgb.png http://imageshack.com/a/img199/9295/jmgb.png
我勒个去??
我需要帮助,谢谢。
您可以使用:
android:imeOptions="flagNoExtractUi"
在 xml 文件中
或者在 main 中添加:
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;
// etc.
}
或者在 oncreate 中插入以下代码:
editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)