Load image in device independent and screen independent fashion into a layout view using 1.6 SDK
- by Mark Wigzell
I'm having trouble getting an asset image to scale up when I load it. The new call to BitmapDrawable(Resources, BitmapDrawable) is not available on 1.6 SDK.
Is there a workaround to load the BitmapDrawable the old way and then somehow manipulate it? I have tried calling setTargetDensity() to no avail. My code (which doesn't scale properly) is:
ImageView iv = (ImageView)view.findViewById(R.id.image);
iv.setImageDrawable(new BitmapDrawable(view.getContext().getAssets().open(path)));