List of usage examples for android.os Bundle putParcelableArrayList
public void putParcelableArrayList(@Nullable String key, @Nullable ArrayList<? extends Parcelable> value)
From source file:org.xbmc.kore.ui.AllCastActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString(EXTRA_TITLE, movie_tvshow_title); outState.putParcelableArrayList(EXTRA_CAST_LIST, castArrayList); }
From source file:org.creativecommons.thelist.activities.MainActivity.java
@Override public void viewImage(ArrayList<GalleryItem> photoObjects, int position) { Bundle b = new Bundle(); b.putParcelableArrayList("photos", photoObjects); b.putInt("position", position); //Start detailed view Intent intent = new Intent(MainActivity.this, ImageActivity.class); intent.putExtras(b);/*w w w .j av a2 s . c o m*/ startActivity(intent); }
From source file:net.thetranquilpsychonaut.hashtagger.cwacpager.ArrayPagerAdapter.java
@Override public Parcelable saveState() { Bundle state = new Bundle(); state.putParcelableArrayList(KEY_DESCRIPTORS, entries); return (state); }
From source file:ar.org.fsadosky.iptablesmanager.fragment.ApplicationsListFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (applications != null) { outState.putParcelableArrayList(LIST_STATE, (ArrayList<? extends Parcelable>) applications.getApplicationItems()); }/* w ww. j a v a 2s . c o m*/ if (adapter != null) { outState.putParcelableArrayList(SEARCH_STATE, (ArrayList<? extends Parcelable>) adapter.getSearchApplicationItems()); } }
From source file:no.kreativo.badetemperaturer.MainActivity.java
public void initializeFragments() { Bundle bundle = new Bundle(); bundle.putParcelableArrayList("counties", listOfCounties); // High-low data Bundle highlowBundle = new Bundle(); ArrayList<Place> allPlaces = new ArrayList<Place>(); for (County c : listOfCounties) { for (Place p : c.getListOfPlaces()) { allPlaces.add(p);// ww w. j a v a2 s.c o m } } highlowBundle.putParcelableArrayList("allplaces", allPlaces); // Update isFavorite field in favorite Places (bad solution) for (String s : dbHelper.getAllFavorites()) { for (County c : listOfCounties) { for (Place p : c.getListOfPlaces()) { if (p.getShortName().equals(s)) { p.setFavorite(true); listOfFavorites.add(p); } } } } Bundle favBundle = new Bundle(); favBundle.putParcelableArrayList("favorites", listOfFavorites); favBundle.putParcelableArrayList("counties", listOfCounties); List<Fragment> fragments = new ArrayList<Fragment>(); OverviewListFragment overviewListFragment = new OverviewListFragment(); KartFragment kartFragment = new KartFragment(); FavoritesFragment favoritesFragment = new FavoritesFragment(); overviewListFragment.setArguments(bundle); kartFragment.setArguments(bundle); favoritesFragment.setArguments(favBundle); HighLowFragment highLowFragment = new HighLowFragment(); highLowFragment.setArguments(highlowBundle); fragments.add(kartFragment); fragments.add(overviewListFragment); fragments.add(favoritesFragment); fragments.add(highLowFragment); viewPager = (ViewPager) findViewById(R.id.viewpager); FragmentManager fragmentManager = getSupportFragmentManager(); viewPager.setAdapter(new ViewPagerAdapter(fragmentManager, fragments)); viewPager.setCurrentItem(1); // Bind the tabs to the ViewPager PagerSlidingTabStrip tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs); tabs.setViewPager(viewPager); //Style tabs tabs.setIndicatorColor(getResources().getColor(R.color.viewpager_indicator_color)); tabs.setShouldExpand(false); }
From source file:org.orange.querysystem.ScoresActivity.java
public void showScoresInfo(Map<Integer, Map<Integer, List<Course>>> courses) { mTabsAdapter.clear();//from ww w .j av a 2s. c o m ArrayList<Bundle> args = new ArrayList<Bundle>(7); //TODO Map????? for (Map<Integer, List<Course>> coursesInAYear : courses.values()) { for (List<Course> coursesInASemester : coursesInAYear.values()) { if (coursesInASemester.get(0).getYear() == 0)//??? { continue; } ArrayList<SimpleScore> scores = new ArrayList<SimpleScore>(); for (Course course : coursesInASemester) { scores.add(new SimpleScore(course.getId(), course.getName(), course.getTestScore(), course.getTotalScore(), course.getGradePoint(), course.getCredit(), course.getKind())); } Bundle arg = new Bundle(); arg.putParcelableArrayList(ListScoresFragment.SCORES_KEY, scores); args.add(arg); } } int counter = 1; for (Bundle arg : args) { TabSpec tabSpec = mTabHost.newTabSpec(counter + ""); mTabsAdapter.addTab(tabSpec.setIndicator((counter++) + ""), ListScoresFragment.class, arg); } }
From source file:zlyh.dmitry.recaller.MainActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelableArrayList(Const.MODEL, records); }
From source file:com.open.file.manager.CutCopyService.java
void sendDuplicateMessage() { Message dupmsg = Message.obtain();//from w w w . ja v a 2 s. co m dupmsg.what = Consts.MSG_DUPLICATES; Bundle dupdata = new Bundle(); dupdata.putParcelableArrayList("duplicates", tree.duplicates); dupmsg.setData(dupdata); MainActivity.acthandler.sendMessage(dupmsg); }
From source file:com.sintef_energy.ubisolar.fragments.UsageFragment.java
private Bundle saveState() { Bundle state = new Bundle(); state.putParcelableArrayList("mDeviceUsageList", mDeviceUsageList); return state; }
From source file:org.proninyaroslav.libretorrent.fragments.DetailTorrentPeersFragment.java
@Override public void onSaveInstanceState(Bundle outState) { if (layoutManager != null) { listPeerState = layoutManager.onSaveInstanceState(); }/* w w w . j a v a 2s. c o m*/ outState.putParcelable(TAG_LIST_PEER_STATE, listPeerState); outState.putParcelableArrayList(TAG_PEER_LIST, peers); super.onSaveInstanceState(outState); }