How to disable auto-capitalization of an EditText

前端 未结 3 733
不思量自难忘°
不思量自难忘° 2020-12-17 23:17

This will have a really simple answer, but I can\'t seem to find what it is. I want to disable the auto-capitalization of an EditText so that, by default, the first letter e

相关标签:
3条回答
  • 2020-12-17 23:56

    Have you tried android:inputType="textFilter"? That will disable all text filters, so there's no auto-correcting.

    0 讨论(0)
  • 2020-12-18 00:07

    You could try using android:inputType="none" instead.

    UPDATE:

    You could also try using android:inputType="text|textEmailAddress"

    0 讨论(0)
  • 2020-12-18 00:08

    For posterity, I think what you're (or more accurately, whoever finds this in the future) looking for is this table of all the options that can be used for the inputType:
    https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

    In this specific case, I would recommend "text".
    Just plain old text. Corresponds to TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_NORMAL.

    0 讨论(0)
提交回复
热议问题