EditText with single text line, line wrapping and Done action?

后端 未结 2 1532
慢半拍i
慢半拍i 2021-02-12 09:27

I am trying to have an EditText with the following characteristics when editing with a soft key. I ready the documentation, searched here, play with the parameters

2条回答
  •  情歌与酒
    2021-02-12 09:55

    Just add

    editText.setHorizontallyScrolling(false);
    editText.setMaxLines(Integer.MAX_VALUE);
    

    with your edittext instance in your activity programmatically.

    It configures the EditText instance so that the user edits a single-line string that is displayed with soft-wrapping on multiple lines with IME options.

提交回复
热议问题