title: Android draw circle with 2 colors (Pie chart)
body: <p>This is my first question here at stackoverflow.com so excuse myself if i'm doing stuff wrong.</p>
  
  <p>I want to create a circle which basically is like a progress bar.  Now I'd like to set the percentage through some code. </p>
  
  <p>What I want to achieve is: <a href="https://raw.github.com/psud/Melde-App/master/res/drawable-hdpi/circlemiddle.png" rel="nofollow">https://raw.github.com/psud/Melde-App/master/res/drawable-hdpi/circlemiddle.png</a></p>
  
  <p>My problems:</p>
  
  <ol>
  <li>Can't get a circle with two colors to work (have been searching forums for hours and have found solutions to problems similar to mine but I just can't implement those solutions that into my app. I've read a lot about canvas.drawArc(...) but can't seem to find out how to use it).</li>
  <li>How is it possible to put a canvas into a layout? (I've got a xml layout and the canvas should be drawn inside a particular layout without changing the rest of the layout).</li>
  </ol>
  
  <p>Thanks.</p>