【发布时间】:2020-10-12 10:15:27
【问题描述】:
我有一个复选框并设置了重心,但该框没有居中
这是我的 XML 文件
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:gravity="center"
android:checked="false"
android:clickable="false"
app:buttonTint="@color/colorPrimary"
android:scaleX="1.4"
android:scaleY="1.4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
复选框图片:
【问题讨论】:
-
使用什么类型的布局?
-
@liangZhenbo 我使用了约束布局
-
你找到答案了吗?
标签: android xml android-studio android-layout checkbox