When you compile an android project from its xml resource, Eclipse considers it as executing xml file and so you get some output from it, in the same name of the xml with .out.xml extension. And you’ll end up with an *.out.xml file and the error res\layout\main.xml:0: error: Resource entry main is already defined. To
Tag: res
Android Get Width And Height Of Image From Resource
In Android to get the width and height of an image from your res folder do the following: BitmapDrawable bd = (BitmapDrawable) this.getResources().getDrawable(R.drawable.icon); int height = bd.getBitmap().getHeight(); int width = bd.getBitmap().getWidth(); If you want the width and height depending the target density you can use the intrinsic values: BitmapDrawable bd = (BitmapDrawable) this.getResources().getDrawable(R.drawable.icon); int imageHeight =