笔记——android EditText多行显示并且支持imeOptions

最近用到EditText的imeOptions的属性,然后条件是在xml中将singleLine设置成true,或者将inputType设置成text,多行显示默认是不支持imeOptions的属性,最后在网上查到了下面的方法(原文链接)。即

xml
android:inputType="text|textCapSentences"
java
editText.setHorizontallyScrolling(false);
editText.setMaxLines(Integer.MAX_VALUE);

猜你喜欢

转载自blog.csdn.net/ting1406525501/article/details/53465821