I have an static image that I want to include as a resource.  I tried
creating a ImageView for viewing that image, but I get the impression
that I'd have to re-implement zoom/scroll in order to zoom/scroll.
Instead, I decided to try to use the default image viewer by starting
an intent:

note: I have the image duplicated at both /drawable and /raw

Intent i= new Intent(Intent.ACTION_VIEW));//or just new Intent();
//i.setAction(Intent.ACTION_VIEW);
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.setDataAndType(Uri.parse("android.resource://
<package>/"+R.drawable.file),"image/*");
//OR i.setDataAndType(Uri.parse("android.resource://<package>/raw/
file.png"),"image/*");
context.startActivity(i);

I've tried several variations, but every time I fail to find a an
Activity satisfying the intent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to