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);

Popular posts from this blog

Open Gallery and get the selected image in appplication

Dismiss or Cancel dialog by swipe gesture

AlarmManager and Notification in Android