简体   繁体   中英

How to set up intent for viewing Bitmap with default Android image viewer?

What I am trying to do is to download image from web and show it on screen with zoom/pan capability. I've successfully downloaded image into Bitmap instance, but ImageView doesnt have zooming feature. So instead I'm willing to present it with default viewer which has zoom/pan features.

How do I set up Intent to view Bitmap with default Android image viewer? I know Intents action should be View:

    intent.setAction(Intent.ACTION_VIEW);

But how to provide data for Intent when image is in Bitmap instance myBitmap ?

If you want to use Android default image viewer use below code

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("string Uri")));

or if you want to show Imageview with zoom In/Out functionality refer below question Android Multi touch zooming

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM