我想知道android Button 的实际填充是什么 我知道它不是填充而是阴影,但我需要制作像素完美的布局并考虑这个空间。 让我们看一下这个例子:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<View
app:layout_constraintStart_toStartOf="@id/someButton"
app:layout_constraintEnd_toEndOf="@id/someButton"
app:layout_constraintTop_toTopOf="@id/someButton"
app:layout_constraintBottom_toBottomOf="@id/someButton"
android:background="@color/black"
android:layout_width="0dp"
android:layout_height="0dp" />
<Button
android:text="someButton"
android:id="@+id/someButton"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</android.support.constraint.ConstraintLayout>
因此,正如您所看到的,顶部和底部填充是相同的,但它们不等于侧边填充。这个填充物的确切值是多少? 感谢