title: Use a progressbar inside a custom view?
body: <p>Hi i have made a custom view and a lifebarprocess.xml . I want to draw the lifebar in my custom view with all the other things i draw. But i don't know how to:</p>
  
  <p>-Creat/reference the processbar inside my view and how i can draw it.
  -May change the progressbar xml ?</p>
  
  <p>The custom view (shorted):</p>
  
  <pre><code>public class Gamecontroller_View  extends View implements OnGestureListener{
  
  private Paint mPaint;
  
  public Gamecontroller_View(){
          mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
          mPaint.setColor(Color.BLUE);
          mPaint.setMaskFilter(new BlurMaskFilter(15, Blur.OUTER));
          mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
  }
  
    @Override
        protected void onDraw(Canvas canvas) {
          super.onDraw(canvas);
  
        if (fingerpointer != null){
            mPaint.setColor(colors[0]);
            canvas.drawCircle(fingerpointer.x, fingerpointer.y, 30, mPaint);
            }
  
         //I want to draw a Progressbar's current appearance here
  
        }
  
  }
  </code></pre>
  
  <p>lifeprocessbar.xml:</p>
  
  <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
    &lt;item android:id="@android:id/background"&gt;
      &lt;shape&gt;
        &lt;corners android:radius="5dip" /&gt;
        &lt;gradient
          android:angle="270"
          android:centerColor="#ff5a5d5a"
          android:centerY="0.5"
          android:endColor="#ff747674"
          android:startColor="#ff9d9e9d" /&gt;
      &lt;/shape&gt;
    &lt;/item&gt;
    &lt;item android:id="@android:id/progress"&gt;
      &lt;clip&gt;
        &lt;shape&gt;
          &lt;corners android:radius="5dip" /&gt;
            &lt;gradient
              android:angle="0"
              android:endColor="#ff0000"
              android:startColor="#ff3300" /&gt;
        &lt;/shape&gt;
      &lt;/clip&gt;
    &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>there is also the lifebarprocess_layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
  
          &lt;ProgressBar
          android:id="@+id/playerlifeprocessbar"
          style="?android:attr/progressBarStyleHorizontal"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_marginTop="30dp"
          android:progress="90"
          android:progressDrawable="@drawable/lifeprocessbar" /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>My someone can help - thanks in adavance. </p>