简体   繁体   中英

Material Button not showing in android

I am using the Material button in android. When I am using the OutlinedButton style the button is not showing at all. I even tried to change the color of the text and stroke color but nothing seems to work.

When I use any other style than OutlinedButton(eg. TextButton) it works.

               <com.google.android.material.button.MaterialButton
                style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                android:id="@+id/btn_resend_otp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Resend OTP"
                android:textAllCaps="false"
                android:textColor="@color/black"
                app:strokeColor="@color/black"
                />

Probably it's a bug of v1.2.0-alpha03 . Try downgrading the version to 1.2.0-alpha02

implementation 'com.google.android.material:material:1.2.0-alpha02'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM