通过图库打开自己的指定图片

需要利用图库打开sd卡中特定的图片,程序如下:

    File file = new File("mnt/sdcard/ScreenCapture/SC20000420-062751.png");
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(Uri.fromFile(file), "image/*");

   startActivity(intent);

这样就可以调用图库打开自己的图片了。   

posted @ 2013-09-25 17:11  Wsf5918  阅读(340)  评论(0编辑  收藏  举报