title: Android: UI elements over canvas layer
body: <p>How do I set some UI elements over (on top of) canvas?</p>
  
  <p>I have a simple touch game that has its graphics placed on custom view with canvas. However as my full screen Panel is in the setContentView() I can't add any UI items like progressBar or logo. I would like to have whole canvas layer visible with some objects (progressBar, logo) "floating" over it.</p>
  
  <p>Main class: </p>
  
  <pre><code>public class GameClass extends Activity implements OnGestureListener {
  
  Panel panel;
  
  public void onCreate(Bundle savedInstance) {
    super.onCreate(savedInstance);
  
    panel = new Panel(this, 1, 2);
    setContentView(Panel);
    ...
  }
  </code></pre>
  
  <p>Panel class:</p>
  
  <pre><code>public class Panel extends View {   
  
    public Panel(Context context, int Var1, int Var2) {
      super(context);
      ...
    }
  
    @Override
    protected void onDraw(Canvas canvas) {
      super.onDraw(canvas);
      ...
    }
  }
  </code></pre>
  
  <p>As code shows, touches are handled inside GameClass and the changes in animation are handled inside Panel.</p>
  
  <p>Or maybe.. Would it be possible to start new transparent activity with progress bar and button so that both the button on overlay activity AND objects on underlying activity? And I could need a way to close all the layers (transparent activity, Panel, GameClass) with the button on transparent activity. Complicated? :D</p>