有时我们在做多行EditText的时候会出现光标在中间的问题:
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="5"
android:background="#ffffff"
android:paddingLeft="5dp"
/>
像这种。
这是什么原因造成的呢?如何EdittText默认是gravity是center.就是从中间对齐。我们把他改成left啊top啊就OK了。
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="5"
android:background="#ffffff"
android:paddingLeft="5dp"
<span style="color:#cc0000;">android:gravity="left"</span>
/>