Android examples for android.os:Bundle
create Bundle via Key and value
import android.os.Bundle; import android.os.Parcelable; public class Main { public static Bundle createBundle(final String key, final boolean value) { final Bundle bundle = new Bundle(); bundle.putBoolean(key, value);// www . ja va2s . c o m return bundle; } public static Bundle createBundle(final String key, final String value) { final Bundle bundle = new Bundle(); bundle.putString(key, value); return bundle; } public static Bundle createBundle(final String key, final Parcelable value) { final Bundle bundle = new Bundle(); bundle.putParcelable(key, value); return bundle; } }