title: How to make a progress bar with rounded corners in Xamarin Forms using Custom Renderer
body: <p>I want to display progress bar with rounded corners in Xamarin forms. I was able to do it in iOS using a custom renderer:</p>
  
  <pre class="lang-cs prettyprint-override"><code>class CustomProgressBarRenderer: ProgressBarRenderer
  {
      protected override void OnElementChanged(ElementChangedEventArgs&lt;Xamarin.Forms.ProgressBar&gt; e)
      {
          base.OnElementChanged(e);
          Control.ProgressTintColor = Color.FromRgb(255, 201, 74).ToUIColor();
      }
  
      public override void LayoutSubviews()
      {
          base.LayoutSubviews();
          var X = 1.0f;
          var Y = 7.0f;
          CGAffineTransform transform = CGAffineTransform.MakeScale(X, Y);
          this.Transform = transform;
          this.ClipsToBounds = true;
          this.Layer.MasksToBounds = true;
          this.Layer.CornerRadius = 5; // This is for rounded corners.
      }
  }
  </code></pre>
  
  <p>How can I achieve the same in Android using Custom Renderer.
  This is how I want the progress bar(rounded corners) to look.</p>
  
  <p><a href="https://i.stack.imgur.com/T3AEa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T3AEa.jpg" alt="enter image description here"></a></p>