List of usage examples for android.os Bundle Bundle
public Bundle()
From source file:com.QuarkLabs.BTCeClient.fragments.HistoryFragment.java
public static HistoryFragment newInstance(ListType historyType) { if (historyType == ListType.ActiveOrders) { throw new IllegalArgumentException("ActiveOrders type is not supported by this Fragment"); }//from www . ja va 2 s . co m Bundle bundle = new Bundle(); bundle.putSerializable(mListTypeTag, historyType); HistoryFragment myFragment = new HistoryFragment(); myFragment.setArguments(bundle); return myFragment; }
From source file:com.sawyer.advadapters.app.dialogs.AddJSONArrayDialogFragment.java
public static AddJSONArrayDialogFragment newInstance() { AddJSONArrayDialogFragment frag = new AddJSONArrayDialogFragment(); //Generate unique movie listing Set<MovieItem> tempMovies = new HashSet<>(); while (tempMovies.size() != 3) { int index = new Random().nextInt(MovieContent.ITEM_LIST.size()); tempMovies.add(MovieContent.ITEM_LIST.get(index)); }/* w w w .ja v a2 s . com*/ //Convert over to JSONArray JSONArray movies = new JSONArray(); for (MovieItem movie : tempMovies) { movies.put(movie.toJSONObject()); } Bundle bundle = new Bundle(); bundle.putString(STATE_MOVIES, movies.toString()); frag.setArguments(bundle); return frag; }
From source file:com.royclarkson.springagram.PhotoAddToGalleryFragment.java
public static PhotoAddToGalleryFragment newInstance(String itemGalleryUrl) { PhotoAddToGalleryFragment fragment = new PhotoAddToGalleryFragment(); Bundle args = new Bundle(); args.putString(ARG_PHOTO_GALLERY_URL, itemGalleryUrl); fragment.setArguments(args);/*w w w. j ava2s.c o m*/ return fragment; }
From source file:com.autburst.picture.facebook.PublishHandler.java
public void go() { Facebook fb = Session.restore(getActivity()).getFb(); AsyncFacebookRunner runner = new AsyncFacebookRunner(fb); Bundle params = new Bundle(); final Intent intent = getActivity().getIntent(); String message = intent.getStringExtra("message"); String link = intent.getStringExtra("link"); String name = intent.getStringExtra("name"); String caption = intent.getStringExtra("caption"); String description = intent.getStringExtra("description"); String picture = intent.getStringExtra("picture"); params.putString("message", message); params.putString("link", link); params.putString("name", name); params.putString("caption", caption); params.putString("description", description); params.putString("picture", picture); runner.request("me/feed", params, "POST", new AsyncRequestListener() { public void onComplete(JSONObject obj) { String html;/* ww w. j a v a2s . co m*/ Log.d(TAG, "onComplete"); getActivity().runOnUiThread(new Runnable() { @Override public void run() { getActivity().showDialog(FacebookActivity.POSTED); } }); } @Override public void onFacebookError(FacebookError e) { showProblem(); } @Override public void onFileNotFoundException(FileNotFoundException e) { showProblem(); } @Override public void onIOException(IOException e) { showProblem(); } @Override public void onMalformedURLException(MalformedURLException e) { showProblem(); } }); }
From source file:com.jrummyapps.busybox.dialogs.AppletUsageDialog.java
public static void show(Activity activity, String applet, String help) { AppletUsageDialog dialog = new AppletUsageDialog(); Bundle args = new Bundle(); args.putString("applet_name", applet); args.putString("applet_help", help); dialog.setArguments(args);/*from w w w . jav a 2 s .c o m*/ dialog.show(activity.getFragmentManager(), "AppletUsageDialog"); Analytics.newEvent("dialog_applet_usage").put("applet", applet).log(); }
From source file:com.clockworkmod.billing.BillingReceiver.java
static Bundle makeRequestBundle(Context context, String method) { Bundle request = new Bundle(); request.putString(Consts.BILLING_REQUEST_METHOD, method); request.putInt(Consts.BILLING_REQUEST_API_VERSION, 1); request.putString(Consts.BILLING_REQUEST_PACKAGE_NAME, context.getPackageName()); return request; }
From source file:io.openkit.leaderboards.OKScoresFragment.java
public static OKScoresFragment newInstance(OKLeaderboard leaderboard) { OKScoresFragment fragment = new OKScoresFragment(); Bundle args = new Bundle(); args.putParcelable(OKLeaderboard.LEADERBOARD_KEY, leaderboard); fragment.setArguments(args);//from w ww. ja v a 2s .c om return fragment; }
From source file:com.ntsync.android.sync.activities.LoginProgressDialog.java
/** * Creates a new Key//from ww w. jav a 2 s . c o m * * @param userName * @param pwdSalt * @param authtoken * @return invisible Dialog */ public static LoginProgressDialog newInstance(String username, String password) { LoginProgressDialog dlg = new LoginProgressDialog(); Bundle args = new Bundle(); args.putString(PARAM_USERNAME, username); args.putString(PARAM_PWD, password); dlg.setArguments(args); return dlg; }
From source file:com.yasiradnan.Schedule.ScheduleSlideFragment.java
public static Fragment create(ScheduleItem[] data) { Fragment fragment = new ScheduleSlideFragment(); Bundle args = new Bundle(); args.putSerializable(ARG_DATA, data); fragment.setArguments(args);//from w w w . ja v a 2 s.c o m return fragment; }
From source file:com.royclarkson.springagram.PhotoListFragment.java
public static PhotoListFragment newInstance(String photosUrl) { PhotoListFragment fragment = new PhotoListFragment(); Bundle args = new Bundle(); args.putString(ARG_PHOTO_LIST_URL, photosUrl); fragment.setArguments(args);//from w w w . j a v a2s .c o m return fragment; }