<Button android:id="@+id/gp_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:onClick="gp"
android:text="@string/go_gplay"
android:textAllCaps="false"
android:theme="@style/ButonTheme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<style name="ButonTheme" parent="ButonTheme">
<item name="android:backgroundTint">#ffffff</item>
<item name="android:textColor">#121212</item>
<item name="android:topLeftRadius">20dp</item>
<item name="android:bottomLeftRadius">20dp</item>
<item name="android:topRightRadius">20dp</item>
<item name="android:bottomRightRadius">20dp</item>
</style>
Как я могу отредактировать радиус границы кнопки в качестве темы, как вы видите, я установил радиус на 20dp, и в предварительном просмотре он показывает нормально, но при компиляции и запуске его в телефоне он показывает радиус по умолчанию. (Я знаю другой «трюк», чтобы сделать форму, а затем установить ее в качестве фона кнопки, но таким образом я потеряю анимацию по умолчанию «материал»)