How can I add an progressbar to my canvas without xml?
<p>this is my code for drawing text.</p>

<pre><code>public void drawText(Canvas canvas)
{



    Paint paint = new Paint();
    paint.setColor(Color.BLACK);
    paint.setTextSize(30);
    paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
    canvas.drawText("DISTANCE: " + (player.getScore()) + " M", 10, HEIGHT - 10, paint);
    canvas.drawText("BEST: " + HighScore + " M", WIDTH - 215, HEIGHT - 10, paint);



    if(!player.getPlaying()&amp;&amp;newGameCreated&amp;&amp;reset)
    {

        Bitmap b2 = BitmapFactory.decodeResource(getResources(), R.drawable.coollogo);
        canvas.drawBitmap(b2, WIDTH/2 - 440, HEIGHT/2 - 360, paint);



        canvas.drawRect(380, 380,630,465 , paint);
        canvas.drawBitmap(b1, WIDTH/2 - 260, HEIGHT/2 + 20, paint);




    }

}
</code></pre>

<p>i now have this:
<a href="https://i.stack.imgur.com/gEnZk.png" rel="nofollow"><img src="https://i.stack.imgur.com/gEnZk.png" alt="enter image description here"></a></p>

<p>I want it like this:</p>

<p><a href="https://i.stack.imgur.com/ZFyGx.png" rel="nofollow"><img src="https://i.stack.imgur.com/ZFyGx.png" alt="enter image description here"></a></p>

<p>I want a progressbar on that place, so you can level up in game.
No Loadingbar, just a progressbar so you can see how far you are in leveling up!
Can someone make this for me or how do i do this??</p>

<p>Many Thanks</p>