Open ythy opened 1 year ago
Environment.getExternalStorageDirectory()
Changed to requireActivity().getExternalFilesDir()
requireActivity().getExternalFilesDir()
MediaStore.Images.Media.getBitmap()
Code required API28
val bmp = ImageDecoder.createSource(requireContext().contentResolver, Uri.fromFile(file)) imageView.setImageBitmap(ImageDecoder.decodeBitmap(bmp))
Environment.getExternalStorageDirectory()
is deprecatedChanged to
requireActivity().getExternalFilesDir()
MediaStore.Images.Media.getBitmap()
is deprecatedCode required API28
506