I am creating a browser and I have an address bar (like EditText) on top of the WebView. What I would like to do is present a graphical page load on the background of an EditText, as in the iphone browser. Is it possible?
thanks
UPDATE
So far I have tried the ClipDrawable approach. What I did was take a backup file android.R.drawable.editbox_background and create 2 versions - on a white background and blue (to show progress). Then I would create a LayerDrawable as follows:
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);
and then I will call setLevel as the download progresses. The problem is that there are such strange problems as: the white drawable is too big or it moves to the beginning.
What do you think?
Alex1987
source share