List of usage examples for android.os Bundle putAll
public void putAll(Bundle bundle)
From source file:luis.clientebanco.OAuth.Utils.java
/** * Parse a URL query and fragment parameters into a key-value bundle. * // www . ja va 2 s . c om * @param url the URL to parse * @return a dictionary bundle of keys and values */ public static Bundle parseUrl(String url) { // hack to prevent MalformedURLException url = url.replace("fbconnect", "http"); url = url.replace("moneyvault", "http"); try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); b.putAll(decodeUrl(u.getRef())); return b; } catch (MalformedURLException e) { return new Bundle(); } }
From source file:com.mobli.android.Util.java
/** * Parse a URL query and fragment parameters into a key-value bundle. * //from www . j a va2s. co m * @param url * the URL to parse * @return a dictionary bundle of keys and values */ public static Bundle parseUrl(String url) { try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); b.putAll(decodeUrl(u.getRef())); return b; } catch (MalformedURLException e) { return new Bundle(); } }
From source file:Main.java
/** * Converts an intent into a {@link Bundle} suitable for use as fragment * arguments.//from w w w. j a v a 2 s . c o m */ public static Bundle intentToFragmentArguments(Intent intent) { Bundle arguments = new Bundle(); if (intent == null) { return arguments; } final Uri data = intent.getData(); if (data != null) { arguments.putParcelable("_uri", data); } final Bundle extras = intent.getExtras(); if (extras != null) { arguments.putAll(intent.getExtras()); } return arguments; }
From source file:Main.java
/** * Inverse operation of {@link #fragmentArgumentsToIntent(Bundle)}. *//*w ww . j av a 2s.c o m*/ public static Bundle intentToFragmentArguments(Intent intent) { Bundle arguments = new Bundle(); if (intent == null) { return arguments; } final Uri data = intent.getData(); if (data != null) { arguments.putParcelable(URI_KEY, data); } final Bundle extras = intent.getExtras(); if (extras != null) { arguments.putAll(extras); } return arguments; }
From source file:com.codeslap.topy.BaseActivity.java
/** * Converts an intent into a {@link Bundle} suitable for use as fragment * arguments.//from w w w . j a v a 2 s .c o m */ public static Bundle intentToFragmentArguments(Intent intent) { Bundle arguments = new Bundle(); if (intent == null) { return arguments; } final Uri data = intent.getData(); if (data != null) { arguments.putParcelable(URI_KEY, data); } final Bundle extras = intent.getExtras(); if (extras != null) { arguments.putAll(intent.getExtras()); } return arguments; }
From source file:cn.bidaround.ytcore.kaixin.KaixinUtil.java
/** * URL??key-value??/* w w w . j a va2s . c o m*/ * * @param url * ?url * @return key-value?? */ public static Bundle parseUrl(String url) { url = url.replace("#", "?"); try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); Bundle ref = decodeUrl(u.getRef()); if (ref != null) b.putAll(ref); return b; } catch (MalformedURLException e) { return new Bundle(); } }
From source file:org.dvbviewer.controller.ui.base.BaseActivity.java
/** * Converts an intent into a {@link Bundle} suitable for use as fragment * arguments./*from w ww .j a v a 2 s .co m*/ * * @param intent the intent * @return the bundle * @author RayBa * @date 07.04.2013 */ public static Bundle intentToFragmentArguments(Intent intent) { Bundle arguments = new Bundle(); if (intent == null) { return arguments; } final Uri data = intent.getData(); if (data != null) { arguments.putParcelable(DATA, data); } final Bundle extras = intent.getExtras(); if (extras != null) { arguments.putAll(intent.getExtras()); } return arguments; }
From source file:eu.inmite.apps.smsjizdenka.framework.activity.BaseActivity.java
/** * Converts an intent into a {@link android.os.Bundle} suitable for use as fragment arguments. *///ww w . ja v a2 s . c o m public static Bundle intentToFragmentArguments(Intent intent) { Bundle arguments = new Bundle(); if (intent == null) { return arguments; } final Uri data = intent.getData(); if (data != null) { arguments.putParcelable("_uri", data); } final String action = intent.getAction(); if (action != null) { arguments.putString("_action", action); } final Bundle extras = intent.getExtras(); if (extras != null) { arguments.putAll(intent.getExtras()); } return arguments; }
From source file:com.iStudy.Study.Renren.Util.java
/** * ?URL??key-value//from w w w . j av a 2 s . co m * * @param url * @return */ public static Bundle parseUrl(String url) { url = url.replace("rrconnect", "http"); url = url.replace("#", "?"); try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); b.putAll(decodeUrl(u.getRef())); return b; } catch (MalformedURLException e) { return new Bundle(); } }
From source file:com.ustadmobile.port.android.view.CatalogOPDSFragment.java
/** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * One can also put in the bundle frag-menuid to set the menuid to be used : otherwise menus * will be set according to if the feed is acquisition or navigation type * * @return A new instance of fragment CatalogOPDSFragment. */// w w w . java 2 s. c om public static CatalogOPDSFragment newInstance(Bundle args) { CatalogOPDSFragment fragment = new CatalogOPDSFragment(); Bundle bundle = new Bundle(); bundle.putAll(args); fragment.setArguments(bundle); return fragment; }