Get thumbnail Uri/path of the image stored in sd card + android

前端 未结 8 716
自闭症患者
自闭症患者 2020-11-28 04:46

SDK version - 1.6

I am using following intent to open android\'s default gallery:

Intent intent = new Intent();
                inte         


        
8条回答
  •  无人及你
    2020-11-28 05:14

    The accepted answer is not working for me. I use following method to make it:

        try{
            Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getActivity().getContentResolver(), uri);
            Bitmap thumbBitmap = ThumbnailUtils.extractThumbnail(bitmap,120,120);
            // imageView.setImageBitmap(thumbBitmap);
        }
        catch (IOException ex){
            //......
        }
    

提交回复
热议问题