wilsonvargas / ButtonCirclePlugin

Circle Buttons with icon for your Xamarin.Forms Applications
MIT License
96 stars 18 forks source link

Border Thickness do not work on Android 6.0 API 23 #25

Closed nicolas-garcia closed 6 years ago

nicolas-garcia commented 6 years ago

Hi!

I have a problem with your package right now on Android 6.0 API 23 and Plugins.Forms.ButtonCircle v2.0.1.48-beta from nuget. I have the following code:

<circleBtn:CircleButton Text="Hello"
                                        FontAttributes="Bold"
                                        WidthRequest="150"
                                        HeightRequest="150"
                                        HorizontalOptions="CenterAndExpand"
                                        VerticalOptions="CenterAndExpand"
                                        BorderRadius="150"
                                        FontSize="22"
                                        TextColor="White"
                                        BackgroundColor="Black"
                                        TranslationY="30"
                                        BorderThickness="20"
                                        BorderColor="Gray"
                                        />

BorderThickness works fine on Android 7.1, but not on 6.0. It is not even displayed. Is this an known issue?

Thank you!

wilsonvargas commented 6 years ago

Yes, this issue is solved by assigning a style like "NoShadow" in your style.xml file:

<style name="NoShadowButton" parent="android:style/Widget.Button">
        <item name="android:stateListAnimator">@null</item>
</style>

And then set this style to android:buttonStyle in your main style, like this:

<item name="android:buttonStyle">@style/NoShadowButton</item>

For more information see this sample file