<EditText
android:id="@+id/add_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:enabled="true"
android:gravity="top" <!-用来设置光标的起始位置从顶行开始,否则默认情况下是从中间行开始->
android:inputType="textMultiLine"
android:minHeight="20dp"
android:minHeight="8"
android:minLines="8"
android:maxLines="10"
android:scrollbars="vertical"
android:background="@android:drawable/edit_text" <!-用来显示控件的边线->
>
</EditText>
refs: https://blog.csdn.net/qq_35867494/article/details/85275712