How to Get EditText maxLength setting in code

后端 未结 7 1168
鱼传尺愫
鱼传尺愫 2020-12-01 12:34

I would like to see the maxLength of an EditText at run time to be able to make a text display decision.
Is that possible?

Here is a de

7条回答
  •  北海茫月
    2020-12-01 12:52

    This should work:

    editText.setFilters(new InputFilter[] { new InputFilter.LengthFilter(12) });
    

提交回复
热议问题