读取系统的图片

Intent intent = new Intent("android.intent.action.PICK");

   intent.setType("image/*");
   startActivityForResult(intent, 0);
   @Override

   protected void onActivityResult(int requestCode, int resultCode, Intent data) {

      if(resultCode == Activity.RESULT_OK) {
         Uri uri = data.getData();         
         iv.setImageURI(uri);
      }
   }

 

posted on 2017-02-20 21:17  LoaderMan  阅读(177)  评论(0编辑  收藏  举报

导航