/ Published in: Java
private String mapPath = "img/full_map.png";
parkMapBitmap = getBitmapFromAsset(this.getContext(),mapPath);
parkMapBitmap = getBitmapFromAsset(this.getContext(),mapPath);
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
AssetManager assetManager = context.getAssets(); InputStream istr; Bitmap bitmap = null; try { istr = assetManager.open(strName); bitmap = BitmapFactory.decodeStream(istr); return null; } return bitmap; }