get Bundle Array From Bundle - Android Android OS

Android examples for Android OS:Bundle Get

Description

get Bundle Array From Bundle

Demo Code


import android.os.Bundle;
import android.os.Parcelable;
import java.util.Arrays;

public class Main{
    public static Bundle[] getBundleArrayFromBundle(Bundle paramBundle, String paramString)
{
  Parcelable[] arrayOfParcelable = paramBundle.getParcelableArray(paramString);
  if (((arrayOfParcelable instanceof Bundle[])) || (arrayOfParcelable == null))
    return (Bundle[])arrayOfParcelable;
  Bundle[] arrayOfBundle = (Bundle[])Arrays.copyOf(arrayOfParcelable, arrayOfParcelable.length, [Landroid.os.Bundle.class);
  paramBundle.putParcelableArray(paramString, arrayOfBundle);
  return arrayOfBundle;
}
}

Related Tutorials