Set maximum number of text lines for an EditText

前端 未结 6 1362
情书的邮戳
情书的邮戳 2020-12-18 23:51

Is there a way of specifying the maximum numbers of lines for an EditText? By that I mean all the lines of text, not only the visible ones (as the android

6条回答
  •  星月不相逢
    2020-12-18 23:57

    android:maxLength="140" 
    

    I believe this is equal to one line, in theory you could change the maxlength to "700" which would be 5 lines. I'm not exactly sure on the numbers but the logic behind it is valid.

提交回复
热议问题