【发布时间】:2023-03-07 21:17:01
【问题描述】:
如何改变android材质按钮的圆角半径。我尝试设置角半径,但它不起作用。
<com.google.android.material.button.MaterialButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/colorPrimary"
android:text="Start"
android:textColor="@android:color/white"
android:textSize="18sp"
app:cornerRadius="8dp" />
【问题讨论】:
-
检查您的应用主题。要使用材料组件库,您必须使用 Material Components Theme
标签: android android-button android-theme material-components-android material-components