在 xml 布局中,我已经设置了重力 = 中心。但是,它似乎仍然是顶部对齐。所以我在想我还缺少其他东西,比如填充。
有没有人曾经有过类似的经历?
请参阅此处的插图:https ://www.dropbox.com/s/p70zdxkbpcdlem7/make%20edittxt.png
下面是我的布局文件:
<EditText
android:id="@+id/subheading"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="60"
android:layout_marginTop="5dp"
android:inputType="textMultiLine|textNoSuggestions"
android:textColor="@android:color/black"
android:textStyle="bold"
android:tag="1001"
android:gravity="center|top"
android:cursorVisible="true"
android:textCursorDrawable="@null"
android:background="@drawable/shape_edittext_editable"
android:ems="10" />