Android Ice Cream Sandwich Edittext: Disabling Spell Check and Word Wrap

前端 未结 7 1874
-上瘾入骨i
-上瘾入骨i 2020-12-23 13:42

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 underlin

7条回答
  •  误落风尘
    2020-12-23 14:29

    In your Java class you can add to the Edittext object...

      wire1type = (EditText)findViewById(R.id.wire1type);
      wire1type.setInputType( ~(InputType.TYPE_TEXT_FLAG_AUTO_CORRECT) );
    

    This clears out the autocorrect flag and will work in API 4.

提交回复
热议问题