Search code examples
xamarin.formsxamarin.androidsyncfusion

Why is the Xamarin linear progress bar cut in half when I set a corner radius on Android?


I am using the Syncfusion Xamarin ProgressBar with a corner radius (version 17.4.0.55):

<progressBar:SfLinearProgressBar
    HeightRequest="16"
    CornerRadius="16"
    Progress="75"
    ProgressColor="#FFffbe06"
    TrackColor="#33ffbe06"
    TrackHeight="16" />

On Android the corner radius applies to the middle of the bar in addition to the sides. It appears to cut the progress bar in two.

enter image description here

This problem does not exist on iOS.

enter image description here

I attempted to solve the issue by setting the SegmentCount to "1". But that did not solve the issue.

<progressBar:SfLinearProgressBar
    ...
    SegmentCount="1" />

What do I need to update in my XAML to avoid the middle corner radius?


Solution

  • After review this using Syncfusion's example app, I discovered that there is a difference between running the app in Debug mode and Run mode. Here is an example of both modes:

    Debug Mode

    Run Mode

    The top image is in debug mode and you can see the little gap on it. The bottom one is in Run mode and it is a perfect progress bar.

    Definitely is something that needs to be reported to Syncfusion as a bug.