Example usage for android.content Intent putParcelableArrayListExtra

List of usage examples for android.content Intent putParcelableArrayListExtra

Introduction

In this page you can find the example usage for android.content Intent putParcelableArrayListExtra.

Prototype

public @NonNull Intent putParcelableArrayListExtra(String name, ArrayList<? extends Parcelable> value) 

Source Link

Document

Add extended data to the intent.

Usage

From source file:Main.java

public static void jumpToSystemShareImages(Context context, ArrayList<Uri> imageUris) {
    Intent shareIntent = new Intent();
    shareIntent.setAction("android.intent.action.SEND_MULTIPLE");
    shareIntent.putParcelableArrayListExtra("android.intent.extra.STREAM", imageUris);
    shareIntent.setType("image/*");
    context.startActivity(shareIntent);/*www.ja v a2 s  .  c  o  m*/
}

From source file:Main.java

public static void sendIntent(Context context, Class classes, String key,
        ArrayList<? extends Parcelable> value) {
    Intent intent = new Intent();
    intent.setClass(context, classes);/*from w  w  w.  ja  v  a 2 s.c om*/
    intent.putParcelableArrayListExtra(key, value);
    context.startActivity(intent);
}

From source file:Main.java

public static void sendIntent(Context context, Class classes, String key, ArrayList<? extends Parcelable> value,
        String anotherKey, String anotherValue) {
    Intent intent = new Intent();
    intent.setClass(context, classes);// ww  w  .  j  a v a  2 s  . c o  m
    intent.putParcelableArrayListExtra(key, value);
    intent.putExtra(anotherKey, anotherValue);
    context.startActivity(intent);
}

From source file:id.satusatudua.sigap.ui.PictureActivity.java

public static Intent generateIntent(Context context, List<Message> messages, int position) {
    Intent intent = new Intent(context, PictureActivity.class);
    intent.putParcelableArrayListExtra(KEY_MESSAGES, (ArrayList<Message>) messages);
    intent.putExtra(KEY_POSITION, position);
    return intent;
}

From source file:com.acv.gallery.view.activity.ImageDetailActivity.java

private static Intent newInstance(Context context, List<Image> images, int currentPosition) {
    Intent intent = new Intent(context, ImageDetailActivity.class);
    intent.putParcelableArrayListExtra(EXTRA_IMAGES, (ArrayList<Image>) images);
    intent.putExtra(EXTRA_CURRENT_POSITION, currentPosition);
    return intent;
}

From source file:com.burnevsky.firu.TranslationsActivity.java

public static void showWords(Activity caller, ArrayList<Word> words, int selection) {
    Intent intent = new Intent(caller, TranslationsActivity.class);
    intent.putParcelableArrayListExtra(TranslationsActivity.INTENT_EXTRA_WORD_LIST, words);
    intent.putExtra(TranslationsActivity.INTENT_EXTRA_WORD_IDX, selection);
    caller.startActivity(intent);//from  ww  w  . j ava  2  s. co m
}

From source file:dev.ngai.fantastic.utils.ActivityUtils.java

public static void startPictureBrowseActivity(@NonNull Context context, @NonNull int discoverId,
        @NonNull List<Imginfo> imgs, @NonNull int index, @NonNull int itemPosition, @NonNull String tab) {
    MobclickAgent.onEvent(context, "PictureBrowse-" + tab + "-discoverId(" + discoverId + ")");
    Intent intent = new Intent(context, PictureBrowseActivity.class);
    ArrayList<Imginfo> list = new ArrayList<>();
    list.addAll(imgs);/*from  w w w  . j a  v  a 2  s. co m*/
    intent.putParcelableArrayListExtra(PictureBrowsePresenter.PICTURE_DATA, list);
    //        intent.putStringArrayListExtra(PictureBrowsePresenter.PICTURE_DATA, list);
    intent.putExtra(PictureBrowsePresenter.PICTURE_INDEX, index);
    intent.putExtra(PictureBrowsePresenter.PICTURE_OBJ_ID, discoverId);
    intent.putExtra(PictureBrowsePresenter.PICTURE_ITEM_POSITION, itemPosition);
    context.startActivity(intent);
}

From source file:com.laevatein.internal.ui.helper.PreviewHelper.java

public static void sendBackResult(ImagePreviewActivity activity) {
    Intent intent = new Intent();
    List<Uri> checked = activity.getStateHolder().getAllChecked();
    intent.putParcelableArrayListExtra(ImagePreviewActivity.EXTRA_RESULT_CHECKED, (ArrayList<Uri>) checked);
    activity.setResult(Activity.RESULT_OK, intent);
}

From source file:me.fireant.photoselect.ui.PhotoPreviewActivity.java

public static void launch(Activity activity, ArrayList<Photo> photos, int selectIndex,
        ArrayList<Photo> selectedPhotos, int maxSelectCount, int requestCode) {
    Intent intent = new Intent(activity, PhotoPreviewActivity.class);
    intent.putParcelableArrayListExtra(BUNDLE_PHOTOS, photos);
    intent.putParcelableArrayListExtra(BUNDLE_SELECTED_PHOTOS, selectedPhotos);
    intent.putExtra(BUNDLE_SELECT_INDEX, selectIndex);
    intent.putExtra(BUNDLE_MAX_SELECT_COUNT, maxSelectCount);
    activity.startActivityForResult(intent, requestCode);
}

From source file:me.fireant.photoselect.ui.PhotoSelectedPreviewActivity.java

public static void luanch(Activity activity, ArrayList<Photo> selectedPhotos, int selectIndex,
        int requsetCode) {
    Intent intent = new Intent(activity, PhotoSelectedPreviewActivity.class);
    intent.putParcelableArrayListExtra(BUNDLE_SELECTED_PHOTOS, selectedPhotos);
    intent.putExtra(BUNDLE_SELECT_INDEX, selectIndex);
    activity.startActivityForResult(intent, requsetCode);
}