Android Ice Cream Sandwich Edittext: Disabling Spe

2019-01-30 23:53发布

Whilst testing on the Android Emulator running Android 4.0 (Ice Cream Sandwich), I have noticed that the Edittext does some quite strange things.

Firstly, it underlines every word identified as "misspelt" in red. How do I disable this? Secondly, although in the layout XML I have specified android:scrollHorizontally="true" word-wrap is enabled: how do I disable this as well? Here is the Layout XML code for the Edittext:

    <EditText
        android:id="@+id/editor"
        android:layout_width="40dp"
        android:layout_height="fill_parent"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/toolbar"
        android:layout_toRightOf="@+id/toolbarleft"
        android:paddingBottom="0dp"
        android:paddingRight="0dp"
        android:scrollHorizontally="true"
        android:text=""
        android:inputType="textMultiLine" >

        <requestFocus />
    </Edittext>

Here is an example of the spell checker I need to disable:

Demonstration of Spell-Checker http://www.abstract-thoughts.com/wp-content/uploads/2011/10/spell.jpg

Thanks very much!

7条回答
神经病院院长
2楼-- · 2019-01-31 00:19
android:inputType="textMultiLine|textPhonetic"

removed all red underlines for me.

android:inputType="textMultiLine|textNoSuggestions"

produces compilation error.

I use Android API 1.6.

查看更多
登录 后发表回答