locked
Progress Bar Help RRS feed

  • Question

  • User385055 posted

    Hi,

    I am trying to implement a progress bar that looks like this on both Android and iOS using custom renderers:

    However, I am struggling to implement a few items:

    1. At low numbers, the progress bar does not fit within the background but overlaps it to create a tall, rectangle
    2. I cannot get text within the progress bar that shows the percentage, that also always centres on the current progress
    3. How can I get the leading edge of the bar to be flat, but still fill in only the corner radius at the end?

    My Android custom renderer is based on this: https://stackoverflow.com/a/46450550

    Thanks

    Tuesday, June 2, 2020 2:32 PM

All replies

  • User371688 posted

    At low numbers, the progress bar does not fit within the background but overlaps it to create a tall, rectangle

    According to the link you shared ,I created a new app , it works properly on android device.

    We don't need to set the BackgroundColor.

    The result is:

    Wednesday, June 3, 2020 3:05 AM
  • User371688 posted

    2.I cannot get text within the progress bar that shows the percentage, that also always centres on the current progress

    You can use following code to get the current Progress:

    double currentProgress = myProgressBar.Progress;
    

    Note: myProgressBar is the property x:Name of this ProgressBar.

    Wednesday, June 3, 2020 3:20 AM
  • User371688 posted

    Hi, @rpdben hope you are doing well. I’d like to follow up with you to see if there is any progress. Thanks!

    Wednesday, June 10, 2020 5:58 AM