@@ -82,6 +82,7 @@ public class Pix extends AppCompatActivity implements View.OnTouchListener {
8282 private static final String OPTIONS = "options" ;
8383 private static final int sTrackSnapRange = 5 ;
8484 public static String IMAGE_RESULTS = "image_results" ;
85+ public static String VIDEO_RESULTS = "video_results" ;
8586 public static float TOPBAR_HEIGHT ;
8687 private static int maxVideoDuration = 40000 ;
8788 private static ImageVideoFetcher imageVideoFetcher ;
@@ -357,13 +358,18 @@ public void onAnimationCancel(Animator animation) {
357358 }
358359
359360 public void returnObjects () {
360- ArrayList <String > list = new ArrayList <>();
361+ ArrayList <String > imgList = new ArrayList <>();
362+ ArrayList <String > videoList = new ArrayList <>();
361363 for (Img i : selectionList ) {
362- list .add (i .getUrl ());
363- // Log.e("Pix images", "img " + i.getUrl());
364+ if (i .getMedia_type () == 1 )
365+ imgList .add (i .getUrl ());
366+ else if (i .getMedia_type () == 3 )
367+ videoList .add (i .getUrl ());
368+ // Log.e("Pix images", "img " + i.getUrl());
364369 }
365370 Intent resultIntent = new Intent ();
366- resultIntent .putStringArrayListExtra (IMAGE_RESULTS , list );
371+ resultIntent .putStringArrayListExtra (IMAGE_RESULTS , imgList );
372+ resultIntent .putStringArrayListExtra (VIDEO_RESULTS , videoList );
367373 setResult (Activity .RESULT_OK , resultIntent );
368374 finish ();
369375 }
0 commit comments