Blog Archives

Android Resource Entry Is Already Defined

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

Posted in Android, ErrorFix Tagged with: , , ,

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

Posted in Android, Tips and Tricks Tagged with: , ,