Android 如何将CheckedTextView中的文本与checkbox对齐
我对XML的定义是:Android 如何将CheckedTextView中的文本与checkbox对齐,android,android-layout,android-view,Android,Android Layout,Android View,我对XML的定义是: <CheckedTextView android:textSize="18.0dip" android:text="@string/text" android:textColor="@color/white" android:id="@+id/test" android:layout_width="fill_parent" android:layout_height="wrap_content" androi
<CheckedTextView android:textSize="18.0dip"
android:text="@string/text"
android:textColor="@color/white"
android:id="@+id/test"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:checkMark="?android:attr/textCheckMark" />
一切正常,但
文本始终位于视图的左上角,复选框居中垂直。
他们不在同一条线上。
如何对齐它们。添加此行
android:gravity=“center\u vertical”