List of usage examples for android.os Bundle getStringArray
@Nullable
public String[] getStringArray(@Nullable String key)
From source file:com.granita.tasks.SettingsListFragment.java
/** * The SQL selection condition used to select synced or visible list, the parameters for the select condition, the layout to be used and the column which is * used for current selection is passed through a {@link Bundle}. The fragment layout is inflated and returned. *///from w w w.j av a 2 s .c o m @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Bundle args = getArguments(); mListSelectionArguments = args.getString(LIST_SELECTION_ARGS); mListSelectionParam = args.getStringArray(LIST_STRING_PARAMS); mFragmentLayout = args.getInt(LIST_FRAGMENT_LAYOUT); mSaveOnDetach = args.getBoolean(LIST_ONDETACH_SAVE); mListCompareColumnName = args.getString(COMPARE_COLUMN_NAME); View view = inflater.inflate(mFragmentLayout, container, false); return view; }
From source file:com.miz.service.TheTVDB.java
@Override public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); final Bundle bundle = intent.getExtras(); files = bundle.getStringArray("files"); rowsToDrop = bundle.getStringArray("rowsToDrop"); isEpisodeIdentify = bundle.getBoolean("isEpisodeIdentify", false); isShowIdentify = bundle.getBoolean("isShowIdentify", false); isUnidentifiedIdentify = bundle.getBoolean("isUnidentifiedIdentify", false); isUpdate = bundle.getBoolean("isUpdate", false); rowId = bundle.getLong("rowId", 0); language = bundle.getString("language", ""); for (int i = 0; i < files.length; i++) queue.add(files[i]);/*from ww w . j av a 2s .c o m*/ setup(); new Thread() { @Override public void run() { tvdb = new TheTVDb(getApplicationContext()); if (isUpdate) { thisShow = tvdb.searchForShow(MizLib.decryptEpisode(files[0], PreferenceManager .getDefaultSharedPreferences(getApplicationContext()).getString("ignoredTags", "")), LOCALE); createShow("", ""); } else if (isUnidentifiedIdentify) { thisShow = tvdb.getShow(bundle.getString("tvdbId"), LOCALE); if (rowsToDrop != null) { DbAdapterTvShowEpisode db = MizuuApplication.getTvEpisodeDbAdapter(); for (int i = 0; i < rowsToDrop.length; i++) db.deleteEpisode(rowsToDrop[i]); createShow("", ""); } else { createShow(bundle.getString("season"), bundle.getString("episode")); } } else if (isEpisodeIdentify) { thisShow = tvdb.getShow(bundle.getString("tvdbId"), LOCALE); loadNextEpisode(bundle.getString("season"), bundle.getString("episode")); } else if (isShowIdentify) { // Delete the old show based on its ID TvShow temp = new TvShow(getApplicationContext(), bundle.getString("oldShowId"), "", "", "", "", "", "", "", "", false, "0"); MizLib.deleteShow(getApplicationContext(), temp, false); thisShow = tvdb.getShow(bundle.getString("tvdbId"), LOCALE); createShow("", ""); } } }.start(); return Service.START_NOT_STICKY; }
From source file:mobi.cangol.mobile.base.CustomFragmentManager.java
public void restoreState(Bundle state) { String[] stackTags = state.getStringArray(STATE_TAG); for (String tag : stackTags) { BaseFragment f = (BaseFragment) fragmentManager.findFragmentByTag(tag); stack.addFragment(f);/*from ww w . j a v a 2 s . com*/ stack.addTag(tag); } }
From source file:com.dwdesign.tweetings.activity.FilePickerActivity.java
@Override public Loader<List<File>> onCreateLoader(final int id, Bundle args) { if (args == null) { args = getIntent().getExtras();//from www . j a v a2 s .c o m } final String[] extensions = args != null ? args.getStringArray(INTENT_KEY_FILE_EXTENSIONS) : new String[0]; return new FilesLoader(this, mCurrentDirectory, extensions); }
From source file:com.kuloud.android.aboutlibraries.ui.LibsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); Libs libs;// w w w . ja v a 2 s. c om String[] fields = null; String[] internalLibraries = null; String[] excludeLibraries = null; //read and get our arguments Bundle bundle = getArguments(); if (bundle != null) { fields = bundle.getStringArray(Libs.BUNDLE_FIELDS); internalLibraries = bundle.getStringArray(Libs.BUNDLE_LIBS); excludeLibraries = bundle.getStringArray(Libs.BUNDLE_EXCLUDE_LIBS); autoDetect = bundle.getBoolean(Libs.BUNDLE_AUTODETECT, true); sort = bundle.getBoolean(Libs.BUNDLE_SORT, true); animate = bundle.getBoolean(Libs.BUNDLE_ANIMATE, true); showLicense = bundle.getBoolean(Libs.BUNDLE_LICENSE, false); showLicenseDialog = bundle.getBoolean(Libs.BUNDLE_LICENSE_DIALOG, true); showVersion = bundle.getBoolean(Libs.BUNDLE_VERSION, false); try { libraryModification = (HashMap<String, HashMap<String, String>>) bundle .getSerializable(Libs.BUNDLE_LIBS_MODIFICATION); } catch (Exception ex) { } } //init the Libs instance with fields if they were set if (fields == null) { libs = new Libs(getActivity()); } else { libs = new Libs(getActivity(), fields); } //The last step is to look if we would love to show some about text for this project aboutShowIcon = extractBooleanBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_ICON, "aboutLibraries_description_showIcon"); aboutShowVersion = extractBooleanBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_VERSION, "aboutLibraries_description_showVersion"); aboutShowVersionName = extractBooleanBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_VERSION_NAME, "aboutLibraries_description_showVersionName"); aboutShowVersionCode = extractBooleanBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_VERSION_CODE, "aboutLibraries_description_showVersionCode"); aboutAppName = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_NAME, "aboutLibraries_description_name"); aboutDescription = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_DESCRIPTION, "aboutLibraries_description_text"); aboutSpecial1 = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL1, "aboutLibraries_description_special1_name"); aboutSpecial1Description = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL1_DESCRIPTION, "aboutLibraries_description_special1_text"); aboutSpecial2 = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL2, "aboutLibraries_description_special2_name"); aboutSpecial2Description = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL2_DESCRIPTION, "aboutLibraries_description_special2_text"); aboutSpecial3 = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL3, "aboutLibraries_description_special3_name"); aboutSpecial3Description = extractStringBundleOrResource(libs, bundle, Libs.BUNDLE_APP_ABOUT_SPECIAL3_DESCRIPTION, "aboutLibraries_description_special3_text"); //apply modifications libs.modifyLibraries(libraryModification); //fetch the libraries and sort if a comparator was set libraries = libs.prepareLibraries(internalLibraries, excludeLibraries, autoDetect, sort); if (comparator != null) { Collections.sort(libraries, comparator); } }
From source file:com.github.jksiezni.permissive.fragments.RationaleDialogFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (DEBUG) {/*w ww . j a v a2s . c o m*/ Log.d(getClass().getSimpleName(), "onCreate(): this=" + this + ", savedInstanceState=" + savedInstanceState); } if (savedInstanceState != null) { allowablePermissions = savedInstanceState.getStringArray("permissions"); permissiveMessenger = savedInstanceState.getParcelable("messenger"); } permissiveMessenger.restoreActivity(getActivity()); }
From source file:com.bydavy.card.receipts.fragments.ReceiptPagerFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Bundle args = getArguments(); if (args != null) { mCursorSelection = args.getString(ARG_SELECTION); mCursorSelectionArgs = args.getStringArray(ARG_SELECTION_ARGS); mCursorSortOrder = args.getString(ARG_SORTORDER); mIndex = args.getInt(ARG_PAGE_INDEX); }//from w w w . ja v a 2s. c o m if (savedInstanceState != null) { mIndex = savedInstanceState.getInt(STATE_INDEX); } }
From source file:org.mozilla.gecko.sync.SynchronizerConfigurations.java
protected HashMap<String, SynchronizerConfiguration> enginesMapFromBundleV1(Bundle engineBundle) throws IOException, ParseException, NonObjectJSONException { HashMap<String, SynchronizerConfiguration> engines = new HashMap<String, SynchronizerConfiguration>(); Set<String> keySet = engineBundle.keySet(); for (String engine : keySet) { String[] values = engineBundle.getStringArray(engine); String syncID = values[0]; RepositorySessionBundle remoteBundle = new RepositorySessionBundle(values[1]); RepositorySessionBundle localBundle = new RepositorySessionBundle(values[2]); engines.put(engine, new SynchronizerConfiguration(syncID, remoteBundle, localBundle)); }//from ww w .ja va 2s . co m return engines; }
From source file:com.bydavy.card.receipts.fragments.ReceiptListFragment.java
public String[] getCursorSelectionArgs() { final Bundle args = getArguments(); if (args != null) { return args.getStringArray(ARG_SELECTION_ARGS); }//from www .j a v a2s .c o m return new String[0]; }
From source file:com.dm.wallpaper.board.fragments.dialogs.InAppBillingFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (savedInstanceState != null) { mKey = savedInstanceState.getString(Extras.EXTRA_KEY); mProductsId = savedInstanceState.getStringArray(Extras.EXTRA_PRODUCT_ID); }/*w w w . j av a2 s .c o m*/ loadInAppProducts(); }