title: Android: EditText with Progress bar?
body: <p>I'm building a browser, and I have an address bar (as EditText) on top of the WebView. What I would like to do is to present the loading of the page graphically in the background of the EditText, much like in the iphone's browser. Is this possible?</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>UPDATE</p>
  
  <p>So far I have tried the ClipDrawable approach. What I did was to take the stock drawable android.R.drawable.editbox_background and create 2 versions - a white background and a blue one (to show the progress). Then I would create a LayerDrawable like so:</p>
  
  <pre><code> barDrawable = addressBar.getBackground();
  
      Drawable progress = getResources().getDrawable(R.drawable.editbox_progress);
      cbarDrawable = new ClipDrawable(progress, Gravity.LEFT, ClipDrawable.HORIZONTAL);
      cbarDrawable.setLevel(0);
  
      layerlist = new LayerDrawable(new Drawable[] { barDrawable, cbarDrawable });
  
      addressBar.setBackgroundDrawable(layerlist);
  </code></pre>
  
  <p>and then I would call setLevel as the loading progresses. The problem now is that there are weird issues such as: the white drawable is too big or it moves to the top.</p>
  
  <p>What do you think?</p>