当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.getBundle方法代码示例

本文整理汇总了Java中android.os.Bundle.getBundle方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.getBundle方法的具体用法?Java Bundle.getBundle怎么用?Java Bundle.getBundle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.getBundle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFromAlApplinkData

import android.os.Bundle; //导入方法依赖的package包/类
private static AppLinkData createFromAlApplinkData(Intent intent) {
    Bundle applinks = intent.getBundleExtra(BUNDLE_AL_APPLINK_DATA_KEY);
    if (applinks == null) {
        return null;
    }

    AppLinkData appLinkData = new AppLinkData();
    appLinkData.targetUri = intent.getData();
    if (appLinkData.targetUri == null) {
        String targetUriString = applinks.getString(METHOD_ARGS_TARGET_URL_KEY);
        if (targetUriString != null) {
            appLinkData.targetUri = Uri.parse(targetUriString);
        }
    }
    appLinkData.argumentBundle = applinks;
    appLinkData.arguments = null;
    Bundle refererData = applinks.getBundle(ARGUMENTS_REFERER_DATA_KEY);
    if (refererData != null) {
        appLinkData.ref = refererData.getString(REFERER_DATA_REF_KEY);
    }

    return appLinkData;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:24,代码来源:AppLinkData.java

示例2: createFromAlApplinkData

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Parses out any app link data from the Intent passed in.
 * @param intent Intent from the Activity that started because of an app link
 * @return AppLinkData if found. null if not.
 */
public static AppLinkData createFromAlApplinkData(Intent intent) {
    Bundle applinks = intent.getBundleExtra(BUNDLE_AL_APPLINK_DATA_KEY);
    if (applinks == null) {
        return null;
    }

    AppLinkData appLinkData = new AppLinkData();
    appLinkData.targetUri = intent.getData();
    if (appLinkData.targetUri == null) {
        String targetUriString = applinks.getString(METHOD_ARGS_TARGET_URL_KEY);
        if (targetUriString != null) {
            appLinkData.targetUri = Uri.parse(targetUriString);
        }
    }
    appLinkData.argumentBundle = applinks;
    appLinkData.arguments = null;
    Bundle refererData = applinks.getBundle(ARGUMENTS_REFERER_DATA_KEY);
    if (refererData != null) {
        appLinkData.ref = refererData.getString(REFERER_DATA_REF_KEY);
    }

    return appLinkData;
}
 
开发者ID:eviltnan,项目名称:kognitivo,代码行数:29,代码来源:AppLinkData.java

示例3: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    final Bundle mapViewSavedInstanceState = savedInstanceState != null ? savedInstanceState.getBundle(KEY_MAPVIEW_SAVE_INSTANCE) : null;
    super.onCreate(mapViewSavedInstanceState);

    // Load last measure
    mCallbacks = new DataBaseLoader(getActivity(),this);
    if (mMapView != null) {
        mMapView.onCreate(savedInstanceState);
    }

    if (savedInstanceState != null) {
        showHeatMap = savedInstanceState.getBoolean(KEY_SHOW_HEATMAP);
        showStations = savedInstanceState.getBoolean(KEY_SHOW_STATIONS);
    }
}
 
开发者ID:medialab-prado,项目名称:puremadrid,代码行数:17,代码来源:MyMapFragment.java

示例4: d

import android.os.Bundle; //导入方法依赖的package包/类
public d(Bundle bundle) {
    this.h = bundle.getString("ext_to");
    this.i = bundle.getString("ext_from");
    this.j = bundle.getString("ext_chid");
    this.g = bundle.getString("ext_pkt_id");
    Parcelable[] parcelableArray = bundle.getParcelableArray("ext_exts");
    if (parcelableArray != null) {
        this.l = new ArrayList(parcelableArray.length);
        for (Parcelable parcelable : parcelableArray) {
            a a = a.a((Bundle) parcelable);
            if (a != null) {
                this.l.add(a);
            }
        }
    }
    Bundle bundle2 = bundle.getBundle("ext_ERROR");
    if (bundle2 != null) {
        this.n = new h(bundle2);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:d.java

示例5: restoreStateParams

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void restoreStateParams(Bundle bundle) {
    currentParams = bundle.getBundle("smsview_params_" + currentType);
    if (currentParams != null) {
        setParams(currentParams);
    }
    String code = bundle.getString("smsview_code_" + currentType);
    if (code != null) {
        codeField.setText(code);
    }
    int t = bundle.getInt("time");
    if (t != 0) {
        time = t;
    }
    int t2 = bundle.getInt("open");
    if (t2 != 0) {
        openTime = t2;
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:20,代码来源:LoginActivity.java

示例6: getResultsResponse

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Build and return a new ResultResponse instant using the arguments passed in.
 *
 * @param arguments  Used to retrieve the ID and request code for the fragment
 *                   requesting the results.
 * @param resultCode The results code to be returned.
 * @param data       Used to return extra data that might be required.
 * @return a new {@link ResultResponse} instance
 */
public static ResultResponse getResultsResponse(Bundle arguments, int resultCode, Bundle data) {
    if (arguments == null || !arguments.containsKey(KEY_REQUEST_BUNDLE)) {
        return null;
    }

    ResultResponse resultResponse = new ResultResponse();
    resultResponse.resultCode = resultCode;
    resultResponse.data = data;

    Bundle requestBundle = arguments.getBundle(KEY_REQUEST_BUNDLE);

    if (requestBundle != null) {
        resultResponse.fragmentId = requestBundle.getString(KEY_FRAGMENT_ID);
        resultResponse.requestCode = requestBundle.getInt(KEY_REQUEST_CODE);
    }

    return resultResponse;
}
 
开发者ID:Fueled,项目名称:flowr,代码行数:28,代码来源:Flowr.java

示例7: initData

import android.os.Bundle; //导入方法依赖的package包/类
private void initData() {
    Intent intent = getIntent();
    Bundle bundle = intent.getExtras();
    if (bundle != null) {
        Bundle data = bundle.getBundle("extra");
        if (data != null) {
            author = data.getString("author");
            url = data.getString("url");
            images = data.getStringArrayList("images");
            newid = data.getString("new_id");
            title = data.getString("title");
        }
    }
}
 
开发者ID:struggledhard,项目名称:USay,代码行数:15,代码来源:WebViewFenLeiActivity.java

示例8: SingleChoiceMode

import android.os.Bundle; //导入方法依赖的package包/类
public SingleChoiceMode(@Nullable final Bundle savedInstanceState) {
    super();
    final Bundle state = (savedInstanceState != null ?
            savedInstanceState.getBundle(KEY_SINGLE_CHOICE_MODE) : null);
    if (state != null) {
        mCheckedId = state.getLong(KEY_CHECKED_ID, RecyclerView.NO_ID);
    }
}
 
开发者ID:GlobusLTD,项目名称:recyclerview-android,代码行数:9,代码来源:SingleChoiceMode.java

示例9: getErrorDataFromResultIntent

import android.os.Bundle; //导入方法依赖的package包/类
public static Bundle getErrorDataFromResultIntent(Intent resultIntent) {
    if (!isErrorResult(resultIntent)) {
        return null;
    }

    Bundle bridgeArgs = getBridgeArgumentsFromIntent(resultIntent);
    if (bridgeArgs != null) {
        return bridgeArgs.getBundle(BRIDGE_ARG_ERROR_BUNDLE);
    }

    return resultIntent.getExtras();
}
 
开发者ID:eviltnan,项目名称:kognitivo,代码行数:13,代码来源:NativeProtocol.java

示例10: restoreStateParams

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void restoreStateParams(Bundle bundle) {
    currentParams = bundle.getBundle("passview_params");
    if (currentParams != null) {
        setParams(currentParams);
    }
    String code = bundle.getString("passview_code");
    if (code != null) {
        codeField.setText(code);
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:12,代码来源:LoginActivity.java

示例11: restoreManagedDialogs

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Restore the state of any saved managed dialogs.
 *
 * @param savedInstanceState The bundle to restore from.
 */
private void restoreManagedDialogs(Bundle savedInstanceState) {
    final Bundle b = savedInstanceState.getBundle(SAVED_DIALOGS_TAG);
    if (b == null) {
        return;
    }

    final int[] ids = b.getIntArray(SAVED_DIALOG_IDS_KEY);
    final int numDialogs = ids.length;
    mManagedDialogs = new SparseArray<ManagedDialog>(numDialogs);
    for (int i = 0; i < numDialogs; i++) {
        final Integer dialogId = ids[i];
        Bundle dialogState = b.getBundle(savedDialogKeyFor(dialogId));
        if (dialogState != null) {
            // Calling onRestoreInstanceState() below will invoke dispatchOnCreate
            // so tell createDialog() not to do it, otherwise we get an exception
            final ManagedDialog md = new ManagedDialog();
            md.mArgs = b.getBundle(savedDialogArgsKeyFor(dialogId));
            md.mDialog = createDialog(dialogId, dialogState, md.mArgs);
            if (md.mDialog != null) {
                mManagedDialogs.put(dialogId, md);
                onPrepareDialog(dialogId, md.mDialog, md.mArgs);
                md.mDialog.onRestoreInstanceState(dialogState);
            }
        }
    }
}
 
开发者ID:JessYanCoding,项目名称:ProgressManager,代码行数:32,代码来源:a.java

示例12: initData

import android.os.Bundle; //导入方法依赖的package包/类
private void initData() {
    Intent intent = getIntent();
    Bundle bundle = intent.getExtras();
    if (bundle != null) {
        Bundle data = bundle.getBundle("data");
        if (data != null) {
            authorId = data.getString("authorId");
            imgHeadLink = data.getString("imgHeadLink");
            contentUrl = data.getString("contentUrl");
            Log.d("contentUrl", contentUrl);
        }
    }
}
 
开发者ID:struggledhard,项目名称:USay,代码行数:14,代码来源:WebViewActivity.java

示例13: deserialize

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Read a field's value from the saved state {@link Bundle}.
 *
 * @param state {@link Bundle} used to save the state
 * @param key   key retrieved from {@code fieldDeclaringClass#fieldName}
 * @return value of the field
 */
@SuppressWarnings("ConstantConditions")
@Override
public FieldType deserialize(@NonNull Bundle state, @NonNull String key) {
    Bundle bundle = state.getBundle(key);
    if (bundle == null)
        return null;

    Class jsonClass = (Class) bundle.getSerializable(CLASS_KEY);
    String jsonString = bundle.getString(VALUE_KEY);
    //noinspection unchecked
    return (FieldType) gson().fromJson(jsonString, jsonClass);
}
 
开发者ID:Fondesa,项目名称:Lyra,代码行数:20,代码来源:DefaultGsonCoder.java

示例14: restoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Call this from onCreate() so that any saved startActivityForResult parameters will be restored.
 */
public void restoreInstanceState(Bundle savedInstanceState) {
    initCallbackService = savedInstanceState.getString("callbackService");
    savedPluginState = savedInstanceState.getBundle("plugin");
    activityWasDestroyed = true;
}
 
开发者ID:alex-shpak,项目名称:keemob,代码行数:9,代码来源:CordovaInterfaceImpl.java

示例15: getBundle

import android.os.Bundle; //导入方法依赖的package包/类
public Bundle getBundle(Bundle state, String key) {
    return state.getBundle(key + mBaseKey);
}
 
开发者ID:evernote,项目名称:android-state,代码行数:4,代码来源:InjectionHelper.java


注:本文中的android.os.Bundle.getBundle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。