Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Button disappears when setting CornerRadius #12315

Closed
davidortinau opened this issue Sep 30, 2020 · 8 comments · Fixed by #12816
Closed

[Bug] Button disappears when setting CornerRadius #12315

davidortinau opened this issue Sep 30, 2020 · 8 comments · Fixed by #12816
Assignees
Labels
a/brushes a/button blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Milestone

Comments

@davidortinau
Copy link
Contributor

Description

On Android 10 the Button only appears/renders when the CornerRadius is zero.

<Button
    Grid.Row="1"
    HorizontalOptions="End"
    VerticalOptions="Center"
    HeightRequest="44"
    WidthRequest="44"
    Background="{StaticResource BlueGradient}"
    BorderWidth="0"
    TextColor="White"
    FontSize="24"
    Padding="0"
    CornerRadius="{OnPlatform Android=8, Default=8}"
    Text="{x:Static theme:IconFont.Plus}"
    FontFamily="FontAwesome"/>

CornerRadius=0:
image

CornerRadius=8:
image

Basic Information

  • Version with issue: 5.0-nightly
    • Android: 10

Reproduction Link

https://github.com/davidortinau/PersonalFinanceSample

@davidortinau davidortinau added t/bug 🐛 s/unverified New report that has yet to be verified labels Sep 30, 2020
@samhouts samhouts added this to New in Triage Sep 30, 2020
@hartez
Copy link
Contributor

hartez commented Sep 30, 2020

@davidortinau Can you fix the build errors in that repro project? Also, there's a flag missing and it crashes at runtime telling me that there's no static resource called CalendarRadioTemplate.

@hartez hartez added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Sep 30, 2020
@hartez hartez moved this from New to Needs Info in Triage Sep 30, 2020
@jsuarezruiz
Copy link
Contributor

I have created a repro sample using 5.0.0 branch: https://github.com/xamarin/Xamarin.Forms/tree/fix-12315 but cannot reproduce the issue:
issue12315
I'm missing something?

@jsuarezruiz jsuarezruiz self-assigned this Oct 1, 2020
@davidortinau davidortinau added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Oct 6, 2020
@davidortinau davidortinau added this to the 5.0.0 milestone Oct 6, 2020
@davidortinau
Copy link
Contributor Author

pushed davidortinau/PersonalFinanceSample@f08e0fb which compiles, runs, and fails to render the Button.

https://github.com/davidortinau/PersonalFinanceSample/blob/main/src/PersonalFinance/Pages/MainPage.xaml#L69

@hartez hartez moved this from Needs Info to New in Triage Oct 8, 2020
@hartez hartez removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Oct 8, 2020
@jsuarezruiz
Copy link
Contributor

I still can't reproduce the issue (neither creating example, nor in branch 5.0.0) :(
I have created a small example using Xamarin.Forms 5.0-pre2:
Issue12315.zip

The result (same Button using exactly the same properties):
Captura de pantalla 2020-10-09 a las 10 18 55

@hartez or someone else, can you try the David example and/or mine?

@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Oct 9, 2020
@jsuarezruiz jsuarezruiz added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Oct 9, 2020
@davidortinau
Copy link
Contributor Author

Updated to 5.0-pre2 and it's working now.
image

So I tried 5.0.1.16606-nightly and it's broken (button disappeared).

image

Same with your sample project. Button appears when I change to 0 radius.

image

Updated solution:
Issue12315.zip

@jsuarezruiz jsuarezruiz removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Oct 29, 2020
@jsuarezruiz jsuarezruiz moved this from Needs Info to Ready For Work in Triage Oct 29, 2020
@jsuarezruiz jsuarezruiz added this to To do in vNext+1 (5.0.0) via automation Oct 29, 2020
@jsuarezruiz jsuarezruiz moved this from To do to Blockers in vNext+1 (5.0.0) Oct 29, 2020
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Oct 29, 2020
@jsuarezruiz
Copy link
Contributor

I can reproduce the issue in the last attached example but on the 5.0.0 branch, I still can't reproduce it.
@PureWeen Could you try https://github.com/xamarin/Xamarin.Forms/blob/fix-12315/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue12315.xaml to validate this case, please?

@Redth Redth moved this from Ready For Work to Needs Estimate in Triage Oct 29, 2020
@samhouts samhouts moved this from Blockers to To do 2 in vNext+1 (5.0.0) Nov 3, 2020
@samhouts samhouts moved this from To do 2 to Blockers in vNext+1 (5.0.0) Nov 3, 2020
@jsuarezruiz jsuarezruiz added the in-progress This issue has an associated pull request that may resolve it! label Nov 12, 2020
@jsuarezruiz jsuarezruiz moved this from Blockers to In Progress in vNext+1 (5.0.0) Dec 10, 2020
Triage automation moved this from Needs Estimate to Closed Dec 30, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Dec 30, 2020
@ryanharding
Copy link

This is still happening on live version. 5.0.1.1876

@kmvickers
Copy link

I have this happening in version 5.0.1.1876 was there ever a fix ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/brushes a/button blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Projects
Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

5 participants