Ответ
Для изменения дизайна кнопки в Android можно использовать XML-атрибуты или программный код.
XML (styles.xml или прямо в layout):
<Button
android:id="@+id/myButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click me"
android:background="@drawable/custom_button_shape"
android:textColor="@color/white"
android:textSize="16sp"/>
Shape-ресурс (custom_button_shape.xml в res/drawable):
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp"/>
<solid android:color="@color/primary"/>
<stroke android:width="1dp" android:color="@color/dark_primary"/>
</shape>
Программно (Kotlin):
val button = findViewById<Button>(R.id.myButton)
button.setBackgroundColor(ContextCompat.getColor(this, R.color.primary))
button.setTextColor(Color.WHITE)
Для сложных стилей лучше использовать MaterialButton из библиотеки Material Components.