List of usage examples for android.os Bundle putStringArray
public void putStringArray(@Nullable String key, @Nullable String[] value)
From source file:com.example.android.permissionrequest.ConfirmationDialogFragment.java
/** * Creates a new instance of ConfirmationDialogFragment. * * @param resources The list of resources requested by PermissionRequeste. * @return A new instance./*from w w w.j a v a 2s. co m*/ */ public static ConfirmationDialogFragment newInstance(String[] resources) { ConfirmationDialogFragment fragment = new ConfirmationDialogFragment(); Bundle args = new Bundle(); args.putStringArray(ARG_RESOURCES, resources); fragment.setArguments(args); return fragment; }
From source file:com.towerlabs.yildizyemek.DinnerPage.java
public static DinnerPage newInstance(String[] str) { DinnerPage dinnerPageFragment = new DinnerPage(); Bundle args = new Bundle(); args.putStringArray(BUNDLE_KEY, str); dinnerPageFragment.setArguments(args); return dinnerPageFragment; }
From source file:com.iskrembilen.quasseldroid.gui.dialogs.JoinChannelDialog.java
public static JoinChannelDialog newInstance(String[] networkNames) { JoinChannelDialog fragment = new JoinChannelDialog(); Bundle args = new Bundle(); args.putStringArray("networks", networkNames); fragment.setArguments(args);/* www . ja v a2 s . co m*/ return fragment; }
From source file:com.sherdle.universal.drawer.TabAdapter.java
public static Fragment fragmentFromAction(NavItem action) { try {/*from www . jav a 2 s . c o m*/ Fragment fragment = action.getFragment().newInstance(); Bundle args = new Bundle(); args.putStringArray(MainActivity.FRAGMENT_DATA, action.getData()); fragment.setArguments(args); return fragment; } catch (InstantiationException e) { Log.printStackTrace(e); } catch (IllegalAccessException e) { Log.printStackTrace(e); } return null; }
From source file:com.zns.comicdroid.dialog.AuthorIllustratorDialogFragment.java
public static AuthorIllustratorDialogFragment newInstance(int comicId, String names) { AuthorIllustratorDialogFragment dialog = new AuthorIllustratorDialogFragment(); Bundle args = new Bundle(); args.putStringArray("Names", names.split(",")); args.putInt("ComicId", comicId); dialog.setArguments(args);/*from www . j av a2 s . c o m*/ return dialog; }
From source file:com.iskrembilen.quasseldroid.gui.dialogs.HideEventsDialog.java
public static @NonNull HideEventsDialog newInstance(Buffer buffer) { HideEventsDialog fragment = new HideEventsDialog(); String[] filterList = IrcMessage.Type.getFilterList(); boolean[] checked = new boolean[filterList.length]; ArrayList<IrcMessage.Type> filters = buffer.getFilters(); for (int i = 0; i < checked.length; i++) { checked[i] = (filters.contains(IrcMessage.Type.valueOf(filterList[i]))); }//from ww w . j av a 2s . co m Bundle args = new Bundle(); args.putStringArray("filterlist", filterList); args.putBooleanArray("checked", checked); args.putInt("bufferid", buffer.getInfo().id); fragment.setArguments(args); return fragment; }
From source file:it.polimi.spf.app.fragments.profile.ProfileFieldsFragment.java
/** * Creates a new instance of {@link ProfileFieldsFragment} to show the given * list of profile fields.//from www. j av a 2 s. c om * * @param fieldsToShow - the fields to show; * @return an instance of {@link ProfileFieldsFragment}; */ public static ProfileFieldsFragment newInstance(ProfileField<?>[] fieldsToShow) { if (fieldsToShow == null) { throw new NullPointerException(); } Bundle b = new Bundle(); b.putStringArray(EXTRA_FIELDS_TO_SHOW, ProfileField.toIdentifierList(fieldsToShow)); ProfileFieldsFragment instance = new ProfileFieldsFragment(); instance.setArguments(b); return instance; }
From source file:eu.inmite.demo.dialogs.FavoriteCharacterDialogFragment.java
public static void show(FragmentActivity activity, String title, String[] items) { FavoriteCharacterDialogFragment dialog = new FavoriteCharacterDialogFragment(); Bundle args = new Bundle(); args.putString(ARG_TITLE, title);//from w w w . ja v a2 s. c o m args.putStringArray(ARG_ITEMS, items); dialog.setArguments(args); dialog.show(activity.getSupportFragmentManager(), TAG); }
From source file:monakhv.android.samlib.dialogs.SingleChoiceSelectDialog.java
public static SingleChoiceSelectDialog getInstance(String[] data, OnItemClickListener listener, String title) { SingleChoiceSelectDialog res = new SingleChoiceSelectDialog(); Bundle args = new Bundle(); args.putStringArray(EXTRA_DATA, data); args.putString(EXTRA_TITLE, title);// w ww. j a v a 2s. c om res.setArguments(args); res.setListener(listener); return res; }
From source file:monakhv.android.samlib.dialogs.SingleChoiceSelectDialog.java
public static SingleChoiceSelectDialog getInstance(String[] data, OnItemClickListener listener, String title, int selected) { SingleChoiceSelectDialog res = new SingleChoiceSelectDialog(); Bundle args = new Bundle(); args.putStringArray(EXTRA_DATA, data); args.putString(EXTRA_TITLE, title);// w w w . ja va 2s.c om args.putInt(EXTRA_SELECTED, selected); res.setArguments(args); res.setListener(listener); return res; }