copy Bundle Array from Parcelable to Bundle - Android android.os

Android examples for android.os:Bundle

Description

copy Bundle Array from Parcelable to Bundle

Demo Code

import android.os.Bundle;
import android.os.Parcelable;

public class Main {

  public static Bundle[] copyBundleArray(Parcelable[] parcelables) {
    if (parcelables == null) {
      return new Bundle[0];
    }//w w  w  .j a v  a2  s .c  o  m
    Bundle[] bundles = new Bundle[parcelables.length];
    System.arraycopy(parcelables, 0, bundles, 0, parcelables.length);
    return bundles;
  }

}

Related Tutorials