List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.irccloud.android.fragment.SpamFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (server != null) outState.putInt("cid", server.getCid()); if (buffers != null) outState.putSerializable("buffers", buffers); if (buffersToRemove != null) outState.putSerializable("buffersToRemove", buffersToRemove); }
From source file:com.kccomy.orgar.ui.note.NotePresenter.java
@Override public void edit(TreeNode n) { Fragment editFragment = new NodeEditorFragment(); Bundle bundle = new Bundle(); bundle.putString("action", NodeEditorFragment.EditAction.EDIT.toString()); bundle.putSerializable("node", n); bundle.putSerializable("serialized_org_file", serializedOrgFile); editFragment.setArguments(bundle);// w ww. j ava 2 s . co m view.showNodeEditorFragment(editFragment); }
From source file:com.kccomy.orgar.ui.note.NotePresenter.java
@Override public void addNode(TreeNode n) { Fragment editFragment = new NodeEditorFragment(); Bundle bundle = new Bundle(); bundle.putString("action", NodeEditorFragment.EditAction.ADD.toString()); bundle.putSerializable("node", n); bundle.putSerializable("serialized_org_file", serializedOrgFile); editFragment.setArguments(bundle);/*from w w w .ja va 2s . com*/ view.showNodeEditorFragment(editFragment); }
From source file:com.kccomy.orgar.ui.note.NotePresenter.java
@Override public void addSubNode(TreeNode n) { Fragment editFragment = new NodeEditorFragment(); Bundle bundle = new Bundle(); bundle.putString("action", NodeEditorFragment.EditAction.ADD_SUB.toString()); bundle.putSerializable("node", n); bundle.putSerializable("serialized_org_file", serializedOrgFile); editFragment.setArguments(bundle);/* ww w . j a va 2s . c o m*/ view.showNodeEditorFragment(editFragment); }
From source file:com.kiwi.auready.util.view.ColorPickerDialog.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putIntArray(KEY_COLORS, mColors); outState.putSerializable(KEY_SELECTED_COLOR, mSelectedColor); outState.putStringArray(KEY_COLOR_CONTENT_DESCRIPTIONS, mColorContentDescriptions); }
From source file:augsburg.se.alltagsguide.utilities.ui.BasePageWebViewLanguageActivity.java
protected void loadLanguage(AvailableLanguage language) { Bundle bundle = new Bundle(); bundle.putSerializable(ARG_LANGUAGE, language); getSupportLoaderManager().restartLoader(0, bundle, this); startLoading();/*from w w w . jav a2 s .co m*/ }
From source file:br.com.moviecreator.views.home.HomeFragment.java
@Nullable @Override/*from ww w . ja v a 2 s . co m*/ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.home_app_bar, container, false); adapter = new MoviesAdapter(new ArrayList<Movie>(), LayoutInflater.from(getActivity()), new ItemClickListener<Movie>() { @Override public void onItemClick(Movie movie) { Bundle extra = new Bundle(); extra.putSerializable(DetailsActivity.DETAILS_EXTRA, movie); Intent intent = new Intent(getActivity(), DetailsActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtras(extra); getActivity().startActivity(intent); } }); gridLayoutManager = new GridLayoutManager(getActivity(), 2); gridLayoutManager.setOrientation(GridLayoutManager.VERTICAL); boryLayout = (LinearLayout) rootView.findViewById(R.id.home_bory_search); swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipe_refresh); swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent, R.color.colorPrimary, R.color.colorPrimaryDark); swipeRefreshLayout.setEnabled(false); RecyclerView recyclerViewMovies = (RecyclerView) rootView.findViewById(R.id.movies_result_list); recyclerViewMovies.setHasFixedSize(true); recyclerViewMovies.setLayoutManager(gridLayoutManager); recyclerViewMovies.setAdapter(adapter); recyclerViewMovies.addItemDecoration(new SpacesItemDecoration(10)); boryLayout.setVisibility(View.VISIBLE); swipeRefreshLayout.setVisibility(View.GONE); return rootView; }
From source file:com.galois.qrstream.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setupUI();/* w ww . ja v a 2s . com*/ hideUI(); fragmentManager = getFragmentManager(); transmitFragment = new TransmitFragment(); receiveFragment = new ReceiveFragment(); settingsFragment = new SettingsFragment(); // Load application's default settings before user opens settings // screen because we want Rx and Tx to run with defaults. PreferenceManager.setDefaultValues(this, com.galois.qrstream.lib.R.xml.settings, false); if (savedInstanceState == null) { Intent startingIntent = getIntent(); Log.d(Constants.APP_TAG, "startingIntent " + startingIntent.getAction()); if (startingIntent.getAction().equals(Intent.ACTION_SEND)) { try { Job job = buildJobFromIntent(startingIntent); Bundle bundle = new Bundle(); bundle.putSerializable("job", job); transmitFragment.setArguments(bundle); showFragment(transmitFragment); } catch (IllegalArgumentException e) { Toast.makeText(this, "Unsupported media type.", Toast.LENGTH_LONG).show(); finish(); } } else { showFragment(receiveFragment); } } }
From source file:com.firesoft.member.Activity.C0_ServiceListActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.c0_service_list); mTitleTextView = (TextView) findViewById(R.id.top_view_title); mListView = (XListView) findViewById(R.id.c0_user_list); mListView.setXListViewListener(this, 0); mListView.setPullLoadEnable(true);//from w w w. j a v a2 s . co m mListView.setPullRefreshEnable(true); mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (position - 1 >= 0 && position - 1 < mDataModel.dataList.size()) { SIMPLE_MEMBER member = mDataModel.dataList.get(position - 1); Intent intent_profile = new Intent(C0_ServiceListActivity.this, F0_ProfileActivity.class); Bundle bundle = new Bundle(); bundle.putSerializable("member", member); intent_profile.putExtras(bundle); startActivityForResult(intent_profile, REQUESTCODE1); C0_ServiceListActivity.this.overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out); } } }); mBackButton = (ImageView) findViewById(R.id.top_view_back); mBackButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); mShared = getSharedPreferences(MemberAppConst.USERINFO, 0); nShopid = mShared.getString("shopid", "0"); mDataModel = new MemberListModel(this); mDataModel.addResponseListener(this); mServiceType = new SERVICE_TYPE(); mTitleTextView.setText(""); mDataModel.fetPreService(nShopid, ENUM_SEARCH_ORDER.location_asc); mPublishButton = (TextView) findViewById(R.id.c0_publish_button1); mPublishButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent_profile = new Intent(C0_ServiceListActivity.this, C1_PublishOrderActivity.class); startActivity(intent_profile); C0_ServiceListActivity.this.overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out); } }); // initFilter(); EventBus.getDefault().register(this); LocationManager.getInstance().refreshLocation(); }
From source file:club.frickel.feelathome.DeviceFragment.java
private void onEffectSelected(Effect effect) { Fragment effectConfigFragment = null; assert effect.getConfig() != null; switch (effect.getName()) { case "Wheel": case "Wheel2": case "Rainbow": case "Sunrise": case "Stroboscope": case "Whitefade": case "Random Brightness": case "Random Fade": case "Random Color": effectConfigFragment = new OnlyOneDelayEffectConfigFragment(); break;// w w w .j a v a2s .c om case "Color": case "Clock Color": effectConfigFragment = new OneColorEffectConfigFragment(); break; case "Brightness": case "Brightness Scaling": effectConfigFragment = new BrightnessEffectConfigFragment(); break; case "Colorfade": effectConfigFragment = new OneColorDelayEffectConfigFragment(); break; case "Fire": effectConfigFragment = new FireEffectConfigFragment(); break; case "Power": { effect.getConfig().put("Power", true); break; } } new SendStateHandler(effect, deviceID, getActivity()).execute(); if (effectConfigFragment != null) { Bundle bundle = new Bundle(); bundle.putString(Constants.DEVICE_ID, deviceID); bundle.putSerializable(Constants.EFFECT_STRING, effect); effectConfigFragment.setArguments(bundle); ((Main) getActivity()).replaceFragmentAndAddToBackstack(effectConfigFragment); } }