List of usage examples for android.os Bundle getParcelableArrayList
@Nullable public <T extends Parcelable> ArrayList<T> getParcelableArrayList(@Nullable String key)
From source file:com.client.capturephoto.ImagePagerActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); Bundle bundle = getIntent().getExtras(); ArrayList<ImageInfo> imageInfos = bundle.getParcelableArrayList(Extra.IMAGES); int pagerPosition = bundle.getInt(Extra.IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); }//from ww w .ja v a 2s . c o m options = new DisplayImageOptions.Builder().resetViewBeforeLoading(true) .showImageForEmptyUri(R.drawable.ic_empty).showImageOnFail(R.drawable.ic_error).cacheInMemory(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageInfos)); // pager.setPageTransformer(true, new ZoomOutPageTransformer()); pager.setCurrentItem(pagerPosition); }
From source file:com.jaspersoft.android.jaspermobile.dialog.RecurrenceTypeDialogFragment.java
@Override protected void initDialogParams() { super.initDialogParams(); Bundle args = getArguments(); if (args != null) { selected = args.getParcelable(RECURRENCE_ARG); items = args.getParcelableArrayList(RECURRENCES_ARG); }/*from ww w .jav a2 s . co m*/ }
From source file:demo.chen.com.androiddemo.fragment.CheeseListFragment.java
@Nullable @Override//from www . j ava 2s .com public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rv = (RecyclerView) inflater.inflate(R.layout.fragment_cheese_list, container, false); Bundle bundle = getArguments(); List<BaseItem> list = null; if (bundle != null) { list = bundle.getParcelableArrayList("list"); } setupRecyclerView(list); return rv; }
From source file:com.TurnOrder.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { if (savedInstanceState != null) { playerList = savedInstanceState.getParcelableArrayList("PlayerList"); }// www. j a va 2 s. co m fragmentManager = getFragmentManager(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); playerList = new ArrayList<Player>(); mNavigationDrawerFragment = (NavigationDrawerFragment) getFragmentManager() .findFragmentById(R.id.navigation_drawer); mTitle = getTitle(); // Set up the drawer. mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout)); }
From source file:id.satusatudua.sigap.ui.PictureActivity.java
private void resolveData(Bundle savedInstanceState) { messages = getIntent().getParcelableArrayListExtra(KEY_MESSAGES); if (messages == null && savedInstanceState != null) { messages = savedInstanceState.getParcelableArrayList(KEY_MESSAGES); }//from w w w . j a v a2s.com if (messages == null) { finish(); return; } position = getIntent().getIntExtra(KEY_POSITION, 0); if (position == 0 && savedInstanceState != null) { position = savedInstanceState.getInt(KEY_POSITION, 0); } }
From source file:com.diedrico.diedricoapp.ProjectionFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle sis) { super.onCreate(sis); final View view = inflater.inflate(R.layout.fragment_projection, parent, false); layoutForGL = (LinearLayout) view.findViewById(R.id.layoutForSurfaceViewtabs); Bundle extras = getActivity().getIntent().getExtras(); if (extras != null && extras.getParcelableArrayList("pointVectors") != null) { List<PointVector> comingPointVectors = extras.getParcelableArrayList("pointVectors"); List<LineVector> comingLineVectors = extras.getParcelableArrayList("lineVectors"); List<PlaneVector> comingPlaneVectors = extras.getParcelableArrayList("planeVectors"); Diedrico diedrico = new Diedrico(comingPointVectors, comingLineVectors, comingPlaneVectors, (List<Model>) null); //To put the renderer with the points lines and planes (OpenGL) mGLView = new MyGLSurfaceView(getContext(), new MyGLRenderer(diedrico)); } else {/* w w w .j ava2 s.c om*/ mGLView = new MyGLSurfaceView(getContext(), renderer); } threadTime(); //start the thread, for rotate the camera if the user don't press the screen pressed = false; mGLView.setOnTouchListener(listenerForCamera()); layoutForGL.addView(mGLView); mGLView.requestRender(); return view; }
From source file:com.morlunk.leeroy.LeeroyAppFragment.java
/** * Mandatory empty constructor for the fragment manager to instantiate the * fragment (e.g. upon screen orientation changes). *//*from w ww. j a va2 s.c om*/ public LeeroyAppFragment() { mUpdateReceiver = new ResultReceiver(new Handler()) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { super.onReceiveResult(resultCode, resultData); List<LeeroyAppUpdate> updates = resultData .getParcelableArrayList(LeeroyUpdateService.EXTRA_UPDATE_LIST); List<LeeroyApp> appsWithoutUpdates = resultData .getParcelableArrayList(LeeroyUpdateService.EXTRA_NO_UPDATE_LIST); List<LeeroyException> errors = resultData .getParcelableArrayList(LeeroyUpdateService.EXTRA_EXCEPTION_LIST); LeeroyAppAdapter adapter = new LeeroyAppAdapter(getActivity(), updates, appsWithoutUpdates); setListAdapter(adapter); setListShown(true); if (errors.size() > 0) { AlertDialog.Builder adb = new AlertDialog.Builder(getActivity()); adb.setTitle(R.string.error); StringBuilder sb = new StringBuilder(); for (LeeroyException e : errors) { CharSequence appName = e.getApp().getApplicationInfo() .loadLabel(getActivity().getPackageManager()); sb.append(appName).append(": ").append(e.getLocalizedMessage()).append('\n'); } adb.setMessage(sb.toString()); adb.setPositiveButton(android.R.string.ok, null); adb.show(); } } }; }
From source file:eu.geopaparazzi.core.maptools.FeaturePagerActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_featurepager); Toolbar toolbar = (Toolbar) findViewById(eu.geopaparazzi.mapsforge.R.id.toolbar); setSupportActionBar(toolbar);/* w w w.j a va 2 s . com*/ getSupportActionBar().setDisplayHomeAsUpEnabled(true); Bundle extras = getIntent().getExtras(); featuresList = extras.getParcelableArrayList(FeatureUtilities.KEY_FEATURESLIST); isReadOnly = extras.getBoolean(FeatureUtilities.KEY_READONLY); selectedFeature = featuresList.get(0); PagerAdapter featureAdapter = new FeaturePageAdapter(this, featuresList, isReadOnly, getSupportFragmentManager()); ViewPager featuresPager = (ViewPager) findViewById(R.id.featurePager); // ViewPager viewPager = new ViewPager(this); featuresPager.setAdapter(featureAdapter); featuresPager.addOnPageChangeListener(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); onPageSelected(0); }
From source file:com.lloydtorres.stately.telegrams.FoldersDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_dialog_recycler, container, false); // Restore saved state if (savedInstanceState != null) { folders = savedInstanceState.getParcelableArrayList(FOLDERS_KEY); selected = savedInstanceState.getInt(SELECTED_KEY); }// w w w. j a v a2 s. c om getDialog().setTitle(getString(R.string.telegrams_folders)); initRecycler(view); return view; }
From source file:org.proninyaroslav.libretorrent.fragments.DetailTorrentPeersFragment.java
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { peers = savedInstanceState.getParcelableArrayList(TAG_PEER_LIST); }//ww w.j av a2s.co m }