It is necessary to select images in the gallery and display them in imageView . Launch intenta :( library )

Intent intent = new Intent(getApplicationContext(), MultiImageSelectorActivity.class); // whether show camera intent.putExtra(MultiImageSelectorActivity.EXTRA_SHOW_CAMERA, false); // max select image amount intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_COUNT, 3); // select mode (MultiImageSelectorActivity.MODE_SINGLE OR MultiImageSelectorActivity.MODE_MULTI) intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_MODE, MultiImageSelectorActivity.MODE_MULTI); // default select images (support array list) startActivityForResult(intent, PICK_IMAGE_REQUEST); 

path is an ArrayList

 path = data.getStringArrayListExtra(MultiImageSelectorActivity.EXTRA_RESULT); 

I address on an index to elements

 Uri image = Uri.parse(path.get(0)); Uri image1 = Uri.parse(path.get(1)); Uri image2 = Uri.parse( path.get(2)); 

Logs display:

 12-19 13:48:14.138 30515-30515/com.handlingcitizen.handlingcitizen D/selectimage: /storage/emulated/0/DCIM/Camera/IMG_20161218_195456.jpg 12-19 13:48:14.138 30515-30515/com.handlingcitizen.handlingcitizen D/selectimage1: /storage/emulated/0/DCIM/Camera/IMG_20161218_195505.jpg 12-19 13:48:14.138 30515-30515/com.handlingcitizen.handlingcitizen D/selectimage2: /storage/emulated/0/DCIM/Camera/IMG_20161218_195510.jpg 

and output through

 Picasso.with(getApplicationContext()).load(image).resize(1280, 720).centerInside().into(imageViewUppload); Picasso.with(getApplicationContext()).load(image1).resize(1280, 720).centerInside().into(imageViewUppload1); Picasso.with(getApplicationContext()).load(image2).resize(1280, 720).centerInside().into(imageViewUppload2); 

however, images are not displayed in Layout. Markup Code:

  <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="100dp" android:orientation="horizontal" android:padding="10dp"> <com.joooonho.SelectableRoundedImageView android:id="@+id/upploadImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="1" android:adjustViewBounds="true" android:scaleType="centerCrop" app:civ_border_width="1dp" app:sriv_border_color="#7d8489" app:sriv_border_width="2dip" app:sriv_left_bottom_corner_radius="5dip" app:sriv_left_top_corner_radius="5dip" app:sriv_oval="false" app:sriv_right_bottom_corner_radius="5dip" app:sriv_right_top_corner_radius="5dip" /> <com.joooonho.SelectableRoundedImageView android:id="@+id/upploadImage1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="1" android:adjustViewBounds="true" android:scaleType="centerCrop" app:civ_border_width="3dp" app:sriv_border_color="#7d8489" app:sriv_border_width="2dip" app:sriv_left_bottom_corner_radius="5dip" app:sriv_left_top_corner_radius="5dip" app:sriv_oval="false" app:sriv_right_bottom_corner_radius="5dip" app:sriv_right_top_corner_radius="5dip" /> <com.joooonho.SelectableRoundedImageView android:id="@+id/upploadImage2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="1" android:adjustViewBounds="true" android:scaleType="centerCrop" app:civ_border_width="3dp" app:sriv_border_color="#7d8489" app:sriv_border_width="2dip" app:sriv_left_bottom_corner_radius="5dip" app:sriv_left_top_corner_radius="5dip" app:sriv_oval="false" app:sriv_right_bottom_corner_radius="5dip" app:sriv_right_top_corner_radius="5dip" /> </LinearLayout> 
  • With wrap_content will not work. Specify the required dimensions in the markup (layout_height for example). And there is no sense in centerInside, you have indicated centerCrop for imageView and so. - Yura Ivanov
  • @Yura Ivanov corrected all comments, but nothing has changed. android:layout_width="100dp" android:layout_height="100dp" - upward
  • Try to specify a static image first (via imageView.setImageResource for example). It is necessary to determine the size is not the order or the Picasso case. - Yura Ivanov
  • @ Yura Ivanov is this situation: I, through Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); I take a photo and a photo from the camera is displayed in imageView. but from the gallery there, I will try as you said, only for a file from assets - upward
  • one
    Try "file:///" add a picture in front of the address - Juriy Spb

0