我使用android:layout_centerVertical="true"
属性来居中于textview,它在lvl 18和19中工作正常,但在lvl 16中不起作用。这是整个布局
<RelativeLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:minWidth="45dp"
p1:minHeight="45dp"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:gravity="fill_vertical"
p1:id="@+id/relativeLayout1">
<TextView
p1:text="Text"
p1:visibility="invisible"
p1:layout_width="wrap_content"
p1:layout_height="wrap_content"
p1:id="@+id/item_id" />
<TextView
p1:text="Text"
p1:layout_width="wrap_content"
p1:layout_height="47dp"
p1:layout_alignParentLeft="true"
p1:id="@+id/name"
p1:textColor="@color/black"
p1:layout_centerVertical="true"
p1:layout_marginLeft="12dp"/>
<ImageView
p1:src="@drawable/details_icon"
p1:layout_width="60px"
p1:layout_height="47dp"
p1:layout_alignParentRight="true"
p1:id="@+id/imageView1"
p1:layout_centerVertical="true" />
<LinearLayout
p1:orientation="horizontal"
p1:layout_width="match_parent"
p1:layout_height="1dp"
p1:layout_below="@id/forecastName"
p1:background="@drawable/separator"
p1:id="@+id/linearLayout1"
p1:layout_alignParentBottom="true" />
</RelativeLayout>
如何在prev版本中设置布局的文本中心?