border background is getting solid color when applying to a background button

I have created a rectangle with a border rectangle_border.XML and no solid color.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners android:radius="50dp" />

<size
    android:width="50dp"
    android:height="20dp" />

<stroke
    android:width="2dp"
    android:color="@color/White_Flight" />

and I have a button in which I set the background to rectangle_border:

            <com.google.android.material.button.MaterialButton
                android:id="@+id/loginPage"
                android:layout_width="87dp"
                android:layout_height="27dp"
                android:layout_marginBottom="10dp"
                android:background="@drawable/rectangle_border"
                android:text="@string/login"
                android:textColor="@color/dark_blue"
                android:textSize="8sp"
                app:backgroundTint="@color/White_Flight"
                app:layout_constraintBottom_toBottomOf="@id/home_background"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@id/registerPage" />

the problem is the button is getting a solid color.

Here is the button:
here is the button

and here is the rectangle_border:
and here is the rectangle_border

Source: Android Questions

LEAVE A COMMENT