android头像选择(拍照,相册,裁剪)


组织头像上传时候,不兼容android6.0,并且 imageview.setImageBitmap(BitmapFactory.decodeFile(IMAGE_FILE_LOCATION));//这种方法不对,显示空白。

通过群的帮助找到以下个人的笔记:


http://note.youdao.com/share/web/file.html?id=1440d93711eab06fee98daacbfd55e35&type=note




Bitmap bit = null;
    try {
     bit = BitmapFactory.decodeStream(OrganizationNewActivity.this.getContentResolver().openInputStream(imageUri));
    } catch (FileNotFoundException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
    mImgPicture.setImageBitmap(bit);


//    mImgPicture.setImageBitmap(BitmapFactory.decodeFile(IMAGE_FILE_LOCATION));//这种方法不对,显示空白

原文地址:https://www.cnblogs.com/melons/p/5791911.html