Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-CheckedTextView复选框不符合填充属性?_Android_Checkedtextview - Fatal编程技术网

Android-CheckedTextView复选框不符合填充属性?

Android-CheckedTextView复选框不符合填充属性?,android,checkedtextview,Android,Checkedtextview,我有以下xml代码: 文本视图似乎反映了10 dp填充,但右侧的复选框没有反映。textview和复选框未对齐。有人知道为什么复选框不符合10 dp填充吗?有没有办法让我的文本视图和复选框对齐 <CheckedTextView android:id="@+id/nearMeCheckedTextView" android:layout_width="match_parent" android:layout_height="wrap_content" and

我有以下xml代码:

文本视图似乎反映了10 dp填充,但右侧的复选框没有反映。textview和复选框未对齐。有人知道为什么复选框不符合10 dp填充吗?有没有办法让我的文本视图和复选框对齐

<CheckedTextView 
    android:id="@+id/nearMeCheckedTextView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
    android:clickable="true"
    android:paddingTop="10dp" />

像这样试试

<CheckedTextView 
    android:id="@+id/nearMeCheckedTextView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
    android:clickable="true"
    android:padding="10dp"
    android:gravity="center_vertical" />

请参见此示例。。。为我工作

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/checkedTextViewInterest"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:padding="12dp"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
     />

嗯,我试过了,还是不行。右边的复选框仍然高于我的文本。