【发布时间】:2021-06-06 13:33:46
【问题描述】:
这是我的代码:
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="nice"
android:paddingVertical="0dp"
android:textColor="@color/light_grey"
app:strokeWidth="2dp"
app:strokeColor="@color/light_grey"
app:cornerRadius="10dp"
android:backgroundTint="@color/white"/>
这就是按钮。
Image of the button 它有一个垂直空间,显然不是填充,使按钮小于 40dp。我不想通过增加按钮的高度来解决这个问题。
【问题讨论】:
-
你可能想试试 marginTop 或 paddingTop 属性