Thursday, June 14, 2012

Referring Resources in an Application through URI

Normally we refer resources in an application using resource ID. There is an alternative way to refer resources in Android. That is through Uri. This will be useful when we want to load an image in webview using loadUrl() for zooming.

The format is,


eg: Uri.parse("android.resource://com.smartandroidians.sample/"+R.raw.zoom_image);