我有一个名为textview.xml的文件,它是下拉框的项样式。
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left|center_horizontal"
android:textSize="18sp">
</TextView>
我知道可以同时指定 (Gravity.LEFT | Gravity.CENTER_HORIZONTAL)
,但在xml中不起作用 - 文本只会向左移动。