Android EditText expands to dialog

落花浮王杯 提交于 2019-12-05 11:50:27

add this line to your edit text

android:imeOptions="flagNoFullscreen"

edit text look like this

<EditText
                android:id="@+id/viewer_filter"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="hint_filter"
                android:background="@android:color/white"
                android:drawableLeft="@android:drawable/ic_menu_search"
                android:inputType="text"
                android:paddingLeft="4dp"
                android:selectAllOnFocus="true" 
                android:imeOptions="flagNoFullscreen">

Try to use android:maxLines="1" for EditText

I had similar issue. You can use mEditText.setSingleLine(true); where you are using it. This will solve your problem.

Hi please add this line in java code where your edit text is declared description.setMaxLines(1);

ilomambo

This post addresses the same problem and has the solution

Need to add

android:imeOptions="flagNoExtractUi"

to prevent this behavior.

If someone knows how, please mark this post as duplicate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!