EditText added is not a TextInputEditText. Please switch to using that class instead

前端 未结 5 1360
灰色年华
灰色年华 2020-12-23 15:37

I\'m using an EditText inside a TextInputLayout, but after upgrading the support library to 23.2.0, I get this warning in the logcat, What\'s the d

5条回答
  •  情书的邮戳
    2020-12-23 16:27

    There is no documentation for it, but the class is a regular EditText with a single extra feature:

    Using this class allows us to display a hint in the IME when in 'extract' mode.

    Specifically it sets the EditorInfo.hintText. You'll notice in the TextInputLayout class you can specify the hint and it's appearance rather than as part of the child EditText widget.

    If you need to do that, you should use a TextInputEditText so it pays attention to the hint info you specified in the TextInputLayout.

提交回复
热议问题