/** * @param img */ private void SelectUserImage(ImageView img) { //打开手机的图库; // intent = new Intent(); // intent.setType("image/*"); // intent.setAction(Intent.ACTION_GET_CONTENT); //上面的写法在华为手机中获取的图片列表中部分图片不能被获取到 Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*"); startActivityForResult(intent, CHOOSE_PICTURE); }
解决在华为手机获取的图片列表中部分图片不能被获取到
猜你喜欢
转载自blog.csdn.net/wjr1949/article/details/74287486
今日推荐
周排行