List of usage examples for android.os Bundle getSerializable
@Override
@Nullable
public Serializable getSerializable(@Nullable String key)
From source file:org.mifos.androidclient.main.LoanInstallmentDetailsActivity.java
@Override public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.loan_installment_details); if (bundle != null) { if (bundle.containsKey(LoanInstallmentDetails.BUNDLE_KEY)) { mDetails = (LoanInstallmentDetails) bundle.getSerializable(LoanInstallmentDetails.BUNDLE_KEY); }// ww w .j a va 2s . c om } mAccountNumber = getIntent().getStringExtra(AbstractAccountDetails.ACCOUNT_NUMBER_BUNDLE_KEY); mAccountService = new AccountService(this); }
From source file:org.alfresco.mobile.android.api.session.impl.CloudSessionImpl.java
@SuppressWarnings("unchecked") public CloudSessionImpl(Parcel o) { this.baseUrl = o.readString(); this.userIdentifier = o.readString(); this.password = o.readString(); this.currentNetwork = (CloudNetwork) o.readSerializable(); this.rootNode = o.readParcelable(FolderImpl.class.getClassLoader()); this.repositoryInfo = (RepositoryInfo) o.readSerializable(); this.cmisSession = (Session) o.readSerializable(); Bundle b = o.readBundle(); this.userParameters = (Map<String, Serializable>) b.getSerializable("userParameters"); create();/*from ww w.j a v a 2s . c o m*/ }
From source file:com.velo.cityon.fragment.SwipeRefreshListFragmentFragment.java
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Log.d(LOG_TAG, name + " : onViewCreated"); if (savedInstanceState != null) { items = (List<Posting>) savedInstanceState.getSerializable("items"); } else {/*from www . j a v a2s.co m*/ items = new ArrayList<>(); } // TestAdapter adapter = new TestAdapter( // getActivity(), // R.layout.posting_list, // items); PostingAdapter adapter = new PostingAdapter(getActivity(), R.layout.posting_list, items); setListAdapter(adapter); setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { Log.i(LOG_TAG, "onRefresh called from SwipeRefreshLayout"); initiateRefresh(); } }); // END_INCLUDE (setup_refreshlistener) }
From source file:de.damdi.fitness.activity.create_workout.ExerciseTypeListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_exercisetype_list); // Show the Up button in the action bar. getSupportActionBar().setDisplayHomeAsUpEnabled(true); Bundle args = getIntent().getExtras(); if (args != null && args.containsKey(ARG_WORKOUT)) { mWorkout = (Workout) args.getSerializable(ARG_WORKOUT); }//from ww w . j a v a2 s .c o m if (findViewById(R.id.exercisetype_detail_container) != null) { // The detail container view will be present only in the // large-screen layouts (res/values-large and // res/values-sw600dp). If this view is present, then the // activity should be in two-pane mode. mTwoPane = true; // In two-pane mode, list items should be given the // 'activated' state when touched. ((ExerciseTypeListFragment) getSupportFragmentManager().findFragmentById(R.id.exercisetype_list)) .setActivateOnItemClick(true); } }
From source file:com.hackvg.android.views.activities.MoviesActivity.java
private void initializeFromParams(Bundle savedInstanceState) { MoviesWrapper moviesWrapper = (MoviesWrapper) savedInstanceState.getSerializable(BUNDLE_MOVIES_WRAPPER); mMoviesPresenter.onPopularMoviesReceived(moviesWrapper); }
From source file:com.miqtech.master.client.ui.ImagePagerActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_pager); initImageLoader(this); Bundle bundle = getIntent().getExtras(); List<Map<String, String>> images = (List<Map<String, String>>) bundle.getSerializable(IMAGES); totalNum = images.size();//from w ww . j a v a2 s. c o m int pagerPosition = bundle.getInt(IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.default_img) .showImageOnFail(R.drawable.default_img).resetViewBeforeLoading(true).cacheOnDisc(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.ARGB_8888) .displayer(new FadeInBitmapDisplayer(300)).build(); photo_number = (TextView) findViewById(R.id.photo_number); gallery = (Gallery) findViewById(R.id.galley); pager = (HackyViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(images, this)); //pager.setCurrentItem(pagerPosition); mIndicator = (CirclePageIndicator) findViewById(R.id.indicator); mIndicator.setViewPager(pager); photo_number.setText(1 + "/" + totalNum); GalleyAdapter adapter = new GalleyAdapter(this, images); gallery.setAdapter(adapter); showNUmAndClick(); pager.setCurrentItem(pagerPosition); isHideGallery = getIntent().getIntExtra(IS_HIDE_GALLERY, -1); if (isHideGallery == 1) {//1??gallery photo_number.setVisibility(View.GONE); gallery.setVisibility(View.GONE); } }
From source file:com.ofalvai.bpinfo.ui.alertlist.AlertFilterFragment.java
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { mAlertListType = (AlertListType) savedInstanceState.getSerializable(KEY_ALERT_LIST_TYPE); }/*from www.j a va 2 s . com*/ }
From source file:de.grobox.liberario.ui.TimeAndDateView.java
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { // implicit null check Bundle bundle = (Bundle) state; calendar = (Calendar) bundle.getSerializable(DATE); now = bundle.getBoolean(NOW);/*from ww w.j a v a2s. c om*/ today = bundle.getBoolean(TODAY); updateTexts(); state = bundle.getParcelable(SUPER_STATE); } super.onRestoreInstanceState(state); }
From source file:com.github.mobile.ui.commit.CommitFileViewActivity.java
@Override public Loader<CharSequence> onCreateLoader(int loader, Bundle args) { final String raw = args.getString(ARG_TEXT); final IRepositoryIdProvider repo = (IRepositoryIdProvider) args.getSerializable(ARG_REPO); return new MarkdownLoader(this, repo, raw, imageGetter, false); }
From source file:com.nispok.imgurdroid.fragments.GalleryContentFragment.java
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, @Nullable Bundle savedInstanceState) { if (getArguments() != null) { loadValuesFromArguments(getArguments()); }/* w w w .ja v a 2s . c o m*/ if (savedInstanceState != null) { galleryData = (Gallery) savedInstanceState.getSerializable(SAVED_GALLERY_DATA); galleryInfo = (GalleryInfo) savedInstanceState.getSerializable(SAVED_GALLERY_INFO); } View view = inflater.inflate(R.layout.fragment_gallery_content, container, false); loadViews(view); return view; }