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


Java Bundle.getParcelableArrayList方法代码示例

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


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

示例1: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    steamId = getArguments().getLong(STEAM_ID);
    viewModel = ViewModelProviders.of(this).get(GamesViewModel.class);
    viewModel.init(SteamWebHandler.getInstance(), steamId);
    if (savedInstanceState != null) {
        currentGames = savedInstanceState.getParcelableArrayList(CURRENT_GAMES);
        currentTab = savedInstanceState.getInt(CURRENT_TAB);
    } else {
        currentGames = getArguments().getParcelableArrayList(CURRENT_GAMES);
        currentTab = getArguments().getInt(CURRENT_TAB);
        if (steamId == 0) {
            Toast.makeText(getActivity(), R.string.error_not_logged_in, Toast.LENGTH_LONG).show();
        }
    }
    setHasOptionsMenu(true);
}
 
开发者ID:steevp,项目名称:UpdogFarmer,代码行数:19,代码来源:GamesFragment.java

示例2: onCreateView

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view =inflater.inflate(R.layout.fragment_fail, container, false);
    listView = (ListView)view.findViewById(R.id.fail_fragment_listView);
    adapter = new ConfirmFinishedAdapter(getActivity());
    Bundle bundle = getArguments();
    listItemList= bundle.getParcelableArrayList("listItemList");
    for (listItem e:listItemList) {
        adapter.add(e);
    }
    mAnimAdapter = new SwingBottomInAnimationAdapter(adapter);
    mAnimAdapter.setAbsListView(listView);
    listView.setAdapter(mAnimAdapter);
    return view;
}
 
开发者ID:Luodian,项目名称:Shared-Route,代码行数:18,代码来源:FailFragment.java

示例3: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    getActivityComponent().inject(MainActivity.this);

    setUnBinder(ButterKnife.bind(this));

    mPresenter.onAttach(this);

    setUp();


    if (savedInstanceState != null) {
        ArrayList<Article> articles = savedInstanceState.getParcelableArrayList(EXTRA_ARTICLES);
        adapter.setDataAdapter(articles);
        hideLoading();
        swipeToRefresh(false);
        flag = true; //restore flag to old state(i.e. true)
    }

}
 
开发者ID:ansh94,项目名称:DailyTech,代码行数:24,代码来源:MainActivity.java

示例4: AbsAttachmentsEditPresenter

import android.os.Bundle; //导入方法依赖的package包/类
AbsAttachmentsEditPresenter(int accountId, @Nullable Bundle savedInstanceState) {
    super(accountId, savedInstanceState);
    if (nonNull(savedInstanceState)) {
        currentPhotoCameraUri = savedInstanceState.getParcelable(SAVE_CURRENT_PHOTO_CAMERA_URI);
        textBody = savedInstanceState.getString(SAVE_BODY);
        timerValue = savedInstanceState.containsKey(SAVE_TIMER) ? savedInstanceState.getLong(SAVE_TIMER) : null;
    }

    data = new ArrayList<>();
    if(nonNull(savedInstanceState)){
        ArrayList<AttachmenEntry> savedEntries = savedInstanceState.getParcelableArrayList(SAVE_DATA);
        if(nonEmpty(savedEntries)){
            data.addAll(savedEntries);
        }
    }
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:17,代码来源:AbsAttachmentsEditPresenter.java

示例5: onViewCreatedOk

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onViewCreatedOk(View view, @Nullable Bundle savedInstanceState) {
    mCbCheck = (AppCompatCheckBox) view.findViewById(R.id.cb_page_check);
    mViewPager = (ViewPager) view.findViewById(R.id.view_pager_page);
    mRlRootView = (RelativeLayout) view.findViewById(R.id.rl_page_root_view);
    mScreenSize = DeviceUtils.getScreenSize(getContext());

    mMediaBeanList = new ArrayList<>();
    if (savedInstanceState != null) {
        List<MediaBean> mediaList = savedInstanceState.getParcelableArrayList(EXTRA_MEDIA_LIST);
        mItemClickPosition = savedInstanceState.getInt(EXTRA_ITEM_CLICK_POSITION);

        if (mediaList != null) {
            mMediaBeanList.addAll(mediaList);
        }
    }
    mMediaPreviewAdapter = new MediaPreviewAdapter(mMediaBeanList,
            mScreenSize.widthPixels, mScreenSize.heightPixels, mConfiguration
            , ThemeUtils.resolveColor(getActivity(), R.attr.gallery_page_bg, R.color.gallery_default_page_bg),
            ContextCompat.getDrawable(getActivity(), ThemeUtils.resolveDrawableRes(getActivity(), R.attr.gallery_default_image, R.drawable.gallery_default_image)));
    mViewPager.setAdapter(mMediaPreviewAdapter);
    mCbCheck.setOnClickListener(this);
    mViewPager.setCurrentItem(mItemClickPosition);
    mViewPager.addOnPageChangeListener(this);
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:26,代码来源:MediaPageFragment.java

示例6: restoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public final void restoreInstanceState(@Nullable final Bundle savedInstanceState) {
    if (savedInstanceState != null) {
        firstVisibleTabIndex = savedInstanceState.getInt(FIRST_VISIBLE_TAB_INDEX_EXTRA, -1);
        firstVisibleTabPosition =
                savedInstanceState.getFloat(FIRST_VISIBLE_TAB_POSITION_EXTRA, -1);
        logLevel = (LogLevel) savedInstanceState.getSerializable(LOG_LEVEL_EXTRA);
        tabs = savedInstanceState.getParcelableArrayList(TABS_EXTRA);
        switcherShown = savedInstanceState.getBoolean(SWITCHER_SHOWN_EXTRA);
        selectedTab = savedInstanceState.getParcelable(SELECTED_TAB_EXTRA);
        padding = savedInstanceState.getIntArray(PADDING_EXTRA);
        tabIconId = savedInstanceState.getInt(TAB_ICON_ID_EXTRA);
        tabIconBitmap = savedInstanceState.getParcelable(TAB_ICON_BITMAP_EXTRA);
        tabBackgroundColor = savedInstanceState.getParcelable(TAB_BACKGROUND_COLOR_EXTRA);
        tabTitleTextColor = savedInstanceState.getParcelable(TAB_TITLE_TEXT_COLOR_EXTRA);
        tabCloseButtonIconId = savedInstanceState.getInt(TAB_CLOSE_BUTTON_ICON_ID_EXTRA);
        tabCloseButtonIconBitmap =
                savedInstanceState.getParcelable(TAB_CLOSE_BUTTON_ICON_BITMAP_EXTRA);
        showToolbars = savedInstanceState.getBoolean(SHOW_TOOLBARS_EXTRA);
        toolbarTitle = savedInstanceState.getCharSequence(TOOLBAR_TITLE_EXTRA);
        childRecyclerAdapter.restoreInstanceState(savedInstanceState);
    }
}
 
开发者ID:NeoTerm,项目名称:NeoTerm,代码行数:24,代码来源:TabSwitcherModel.java

示例7: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Bundle args = getArguments();
    if(args != null) {
        mList = args.getParcelableArrayList(ARG_CONTENT);
        mTitle = args.getString(ARG_TITLE);
    }
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:10,代码来源:BottomSheetLikes.java

示例8: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
    user = savedInstanceState.getParcelable(STATE_USER);
    firstPageShots = savedInstanceState.getParcelableArrayList(STATE_FIRST_PAGE_DATA);
    if (firstPageShots == null) {
        firstPageShots = new ArrayList<>();
    }
    setNextPageUrl(savedInstanceState.getString(STATE_NEXT_PAGE_URL));
}
 
开发者ID:gejiaheng,项目名称:Protein,代码行数:10,代码来源:UserShotListPresenter.java

示例9: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Bundle args = getArguments();
	if(null != args){
		docs = args.getParcelableArrayList(EXTRA_DOC_LIST);
	}
}
 
开发者ID:medalionk,项目名称:simple-share-android,代码行数:9,代码来源:MoveFragment.java

示例10: onViewStateRestored

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
    super.onViewStateRestored(savedInstanceState);
    if(savedInstanceState != null) {
        //recyclerView.onRestoreInstanceState(savedInstanceState.getParcelable(VIEW_PARCABLE));
        mPage = savedInstanceState.getInt(MODEL_PAGE);
        isLimit = savedInstanceState.getBoolean(MODEL_LIMIT);
        mData = savedInstanceState.getParcelableArrayList(MODEL_CACHE);
    }
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:11,代码来源:PublicStatusFragment.java

示例11: onCreateView

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View root = inflater.inflate(R.layout.fragment_anime_watch, container, false);
    unbinder = ButterKnife.bind(this, root);
    if(savedInstanceState != null) {
        externalLinks = savedInstanceState.getParcelableArrayList(KEY_EXTERNAL_LINKS);
        targetLink = savedInstanceState.getString(KEY_EXTERNAL_TARGET);
        rssFeed = savedInstanceState.getParcelable(KEY_RSS);
        popular = savedInstanceState.getBoolean(KEY_POPULAR);
    }
    return root;
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:15,代码来源:AnimeWatchFragment.java

示例12: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
    type = savedInstanceState.getInt(STATE_TYPE);
    firstPageShots = savedInstanceState.getParcelableArrayList(STATE_FIRST_PAGE_DATA);
    if (firstPageShots == null) {
        firstPageShots = new ArrayList<>();
    }
    setNextPageUrl(savedInstanceState.getString(STATE_NEXT_PAGE_URL));
}
 
开发者ID:gejiaheng,项目名称:Protein,代码行数:10,代码来源:ShotListPresenter.java

示例13: parseSelectedMedias

import android.os.Bundle; //导入方法依赖的package包/类
private void parseSelectedMedias(Bundle savedInstanceState, Intent intent) {
    if (savedInstanceState != null) {
        mSelectedImages = savedInstanceState.getParcelableArrayList(Boxing.EXTRA_SELECTED_MEDIA);
        mAlbumId = savedInstanceState.getString(Boxing.EXTRA_ALBUM_ID);
        mStartPos = savedInstanceState.getInt(Boxing.EXTRA_START_POS, 0);
    } else if (intent != null) {
        mStartPos = intent.getIntExtra(Boxing.EXTRA_START_POS, 0);
        mSelectedImages = intent.getParcelableArrayListExtra(Boxing.EXTRA_SELECTED_MEDIA);
        mAlbumId = intent.getStringExtra(Boxing.EXTRA_ALBUM_ID);
    }
}
 
开发者ID:Bilibili,项目名称:boxing,代码行数:12,代码来源:AbsBoxingViewActivity.java

示例14: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onRestoreInstanceState(Parcelable state) {
    if (state instanceof Bundle) {
        Bundle bundle = (Bundle) state;
        aPlayersPrefs = bundle.getParcelableArrayList("players");
        mListAdapter.setList(aPlayersPrefs);
        super.onRestoreInstanceState(bundle.getParcelable("super"));
    } else {
        super.onRestoreInstanceState(state);
    }
    notifyChanged();
}
 
开发者ID:dftec-es,项目名称:planetcon,代码行数:13,代码来源:ListPlayersPreference.java

示例15: onViewStateRestored

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
    super.onViewStateRestored(savedInstanceState);
    if(savedInstanceState != null) {
        model = savedInstanceState.getParcelableArrayList(KEY_MODEL_STATE);
        mPage = savedInstanceState.getInt(MODEL_PAGE);
        isLimit = savedInstanceState.getBoolean(MODEL_LIMIT);
        isPaginate = savedInstanceState.getBoolean(KEY_PAGINATE);
    }
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:11,代码来源:DefaultListFragment.java


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