EditText在使用过程中需要限制输入的行数,而不是字数。并且多余的部分用省略号代替。
ellipsize:end:省略号显示在结尾
ellipsize:start:省略号显示在开始ellpsize:middle:省略号显示在中间
android:maxLines:最大输入行数
<TextView
android:id="@+id/edit_text"
android:text="请输入评论"
android:layout_width="wrap_content"
ndroid:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="@dimen/edit_text_size"
android:maxLines="1"
android:ellipsize="end" />