List of usage examples for android.os Bundle getParcelableArrayList
@Nullable public <T extends Parcelable> ArrayList<T> getParcelableArrayList(@Nullable String key)
From source file:com.jaspersoft.android.jaspermobile.dialog.IntervalUnitDialogFragment.java
@Override protected void initDialogParams() { super.initDialogParams(); Bundle args = getArguments(); if (args != null) { if (args.containsKey(UNIT_ARG)) { selected = args.getParcelable(UNIT_ARG); items = args.getParcelableArrayList(UNITS_ARG); }//from ww w .j a va2 s . c o m } }
From source file:com.TurnOrder.MainActivity.java
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onRestoreInstanceState(savedInstanceState); playerList = savedInstanceState.getParcelableArrayList("PlayerList"); }
From source file:eu.hydrologis.geopaparazzi.maptools.FeaturePagerActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.features_viewer); Bundle extras = getIntent().getExtras(); featuresList = extras.getParcelableArrayList(FeatureUtilities.KEY_FEATURESLIST); boolean isReadOnly = extras.getBoolean(FeatureUtilities.KEY_READONLY); selectedFeature = featuresList.get(0); PagerAdapter featureAdapter = new FeaturePageAdapter(this, featuresList, isReadOnly); ViewPager featuresPager = (ViewPager) findViewById(R.id.featurePager); // ViewPager viewPager = new ViewPager(this); featuresPager.setAdapter(featureAdapter); featuresPager.setOnPageChangeListener(this); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); tableNameView = (TextView) findViewById(R.id.tableNameView); dbNameView = (TextView) findViewById(R.id.databaseNameView); featureCounterView = (TextView) findViewById(R.id.featureCounterView); if (isReadOnly) { Button saveButton = (Button) findViewById(R.id.saveButton); saveButton.setVisibility(View.GONE); Button gotoButton = (Button) findViewById(R.id.gotoButton); gotoButton.setVisibility(View.GONE); }// w w w.j a v a 2 s.c om onPageSelected(0); }
From source file:com.jaspersoft.android.jaspermobile.dialog.CalendarDayDialogFragment.java
@Override protected void initDialogParams() { super.initDialogParams(); Bundle args = getArguments(); if (args != null) { selectedDays = args.getParcelableArrayList(SELECTED_DAYS_ARG); days = args.getParcelableArrayList(DAYS_ARG); }/*from w w w .j a va 2 s.c om*/ }
From source file:com.jaspersoft.android.jaspermobile.dialog.CalendarMonthDialogFragment.java
@Override protected void initDialogParams() { super.initDialogParams(); Bundle args = getArguments(); if (args != null) { selectedMonths = args.getParcelableArrayList(SELECTED_MONTHS_ARG); months = args.getParcelableArrayList(MONTHS_ARG); }/*from w w w. j av a 2 s . c o m*/ }
From source file:com.cesarvaliente.permissionssample.presentation.view.contactlist.ContactListFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null && !savedInstanceState.isEmpty()) { contactList = savedInstanceState.getParcelableArrayList(MainActivity.CURRENT_CONTACT_KEY); }/* w w w . j av a2 s . c om*/ //Here we could use a ServiceLocator or a dependency injector to inject the depenencies. // I've decided not to use them since I want that this sample app is really to understand even for // beginners. ThreadExecutor threadExecutor = JobExecutor.getInstance(); PostExecutionThread postExecutionThread = UIThread.getInstance(); ListContactsAction listContactsAction = new ListListContactsActionImpl(this.getContext()); ListContactsUseCase listContactsUseCase = new ListContactsUseCaseImpl(listContactsAction, threadExecutor, postExecutionThread); contactListPresenter = new ContactListPresenter(this, listContactsUseCase); }
From source file:pedroscott.com.popularmoviesapp.app.ui.home.HomeFragment.java
private void initVars(@Nullable Bundle savedInstanceState) { setHasOptionsMenu(true);//from w ww.j av a 2s. c o m if (savedInstanceState != null) { movies = savedInstanceState.getParcelableArrayList(Movie.MOVIES); adapter = new AdapterMovies(movies); } else { movies = new ArrayList<Movie>(); adapter = new AdapterMovies(new ArrayList<Movie>()); loadMovies(getString(R.string.sort_by_popularity)); } }
From source file:ca.hoogit.garagepi.Controls.DoorsFragment.java
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (savedInstanceState != null) { ArrayList<Door> doors = savedInstanceState.getParcelableArrayList(Consts.KEY_DOORS); if (doors != null) { Log.d(TAG, "onActivityCreated: Restored " + doors.size() + " items"); Doors.getInstance().set(doors); updateDoorViews(doors);/*from ww w . j a v a 2s .c o m*/ } } }
From source file:fr.cph.chicago.core.fragment.BikeFragment.java
@NonNull private List<BikeStation> getBikeStations(@Nullable final Bundle savedInstanceState) { List<BikeStation> bikeStations; if (savedInstanceState != null) { bikeStations = savedInstanceState.getParcelableArrayList(getString(R.string.bundle_bike_stations)); } else {/*from ww w . j ava 2 s . c om*/ final Bundle bundle = activity.getIntent().getExtras(); bikeStations = bundle.getParcelableArrayList(getString(R.string.bundle_bike_stations)); } if (bikeStations == null) { bikeStations = new ArrayList<>(); } return bikeStations; }
From source file:ca.shoaib.ping.PingListFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { pingList = savedInstanceState.getParcelableArrayList(KEY_PINGS); } else {/*from w w w.ja v a 2 s. com*/ pingList = new ArrayList<>(); } }