问题
I have a very weird issue. I am picking an image from a gallery the code is working properly on all the devices like Nokia 6 , One Plus X. When it
comes to xiaomi devices the image is not getting set on ImageView
.
Can anyone help me out on how to fix this issue ?
I have to pick multiple images.
Code to pick image from gallery
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
startActivityForResult(Intent.createChooser(intent, "Select File"), SELECT_FILE);
回答1:
Remove multiple images selection if you are selecting then you need to resolve it by Cursor in a new String array.
and also add these two lines in your code:
android:hardwareAccelerated="false"
android:largeHeap="true"
来源:https://stackoverflow.com/questions/45014292/xiaomi-mi-device-not-picking-image-from-gallery