Radius problem on Android

Asked

Viewed 35 times

0

I left the format rounded, but when I click the button it returns to the default format:

inserir a descrição da imagem aqui

after the click the button becomes square again:

inserir a descrição da imagem aqui

  • Good morning. You need to include the code responsible for this interaction, just looking at it won’t be possible to help you.

1 answer

0

Good! Using app:cornerRadius ? I use this way and it works from api 21 to 28 (tested in the app in question)

<Button
    android:id="@+id/btnEntrar"
    android:layout_width="280dp"
    android:layout_height="wrap_content"
    android:padding="12dp"
    android:text="@string/entrar"
    android:backgroundTint="@color/colorOrange"
    android:background="@color/colorOrange"
    android:textColor="@color/colorWhite"
    app:cornerRadius="20dp"
    style="@style/Widget.AppCompat.Button.Colored"
    android:theme="@style/AppTheme.Button"/>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.