Example usage for android.os Bundle getStringArrayList

List of usage examples for android.os Bundle getStringArrayList

Introduction

In this page you can find the example usage for android.os Bundle getStringArrayList.

Prototype

@Override
@Nullable
public ArrayList<String> getStringArrayList(@Nullable String key) 

Source Link

Document

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Usage

From source file:org.schabi.newpipe.util.NavStack.java

public void restoreSavedInstanceState(Bundle state) {
    ArrayList<String> sa = state.getStringArrayList(NAV_STACK);
    for (String url : sa) {
        stack.push(new NavEntry(url, NewPipe.getServiceByUrl(url).getServiceId()));
    }/*from   w  w  w. ja va 2 s.  c  om*/
}

From source file:jp.alessandro.android.iab.ItemGetter.java

private List<String> getDetailsList(Bundle bundle) throws BillingException {
    List<String> detailsList = bundle.getStringArrayList(Constants.RESPONSE_DETAILS_LIST);
    if (detailsList == null) {
        throw new BillingException(Constants.ERROR_UNEXPECTED_TYPE,
                Constants.ERROR_MSG_GET_SKU_DETAILS_RESPONSE_LIST_NULL);
    }/*from w w w.  ja v a 2  s. c  o  m*/
    return detailsList;
}

From source file:com.dayscript.bichitofutbolapp.ImagePagerActivity.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ac_image_pager);
    Bundle bundle = getIntent().getExtras();
    imageUrls = bundle.getStringArrayList("imagenes");
    Log.v("Pager", imageUrls.toString());
    int pagerPosition = bundle.getInt("posicion", 0);

    if (savedInstanceState != null) {
        pagerPosition = savedInstanceState.getInt(STATE_POSITION);
    }//  www .  j  av a 2 s .c o m

    options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_empty)
            .showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading().cacheOnDisc()
            .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new FadeInBitmapDisplayer(300)).build();

    pager = (ViewPager) findViewById(R.id.pager);
    pager.setAdapter(new ImagePagerAdapter(imageUrls));
    pager.setCurrentItem(pagerPosition);

    this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

From source file:jp.alessandro.android.iab.PurchaseGetter.java

private List<String> extractPurchaseList(Bundle bundle) throws BillingException {
    List<String> purchaseList = bundle.getStringArrayList(Constants.RESPONSE_INAPP_PURCHASE_LIST);

    if (purchaseList == null) {
        throw new BillingException(Constants.ERROR_PURCHASE_DATA, Constants.ERROR_MSG_GET_PURCHASES_DATA_LIST);
    }/*from   ww w.  ja v  a  2  s  .  c o  m*/
    return purchaseList;
}

From source file:jp.alessandro.android.iab.PurchaseGetter.java

private List<String> extractSignatureList(Bundle bundle) throws BillingException {
    List<String> signatureList = bundle.getStringArrayList(Constants.RESPONSE_INAPP_SIGNATURE_LIST);

    if (signatureList == null) {
        throw new BillingException(Constants.ERROR_PURCHASE_DATA,
                Constants.ERROR_MSG_GET_PURCHASES_SIGNATURE_LIST);
    }//from www .j a  v  a  2  s  . com
    return signatureList;
}

From source file:net.reichholf.dreamdroid.fragment.dialogs.MultiChoiceDialog.java

public void init() {
    Bundle args = getArguments();
    mTitleId = args.getInt(KEY_TITLE_ID);
    mItems = BundleHelper.toCharSequenceArray(args.getStringArrayList((KEY_ITEMS)));
    mCheckedItems = args.getBooleanArray(KEY_CHECKED_ITEMS);
    mPositiveStringId = args.getInt(KEY_POSITIVE_STRING_ID);
}

From source file:org.hedgewars.hedgeroid.TeamAddDialog.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState != null) {
        teamsAlreadyInGame = savedInstanceState.getStringArrayList(STATE_TEAMS_ALREADY_IN_GAME);
    }/*from  w  w  w.  j  av  a2s  .c o  m*/
    availableTeams = new ArrayList<Team>();
    List<Team> teams = FrontendDataUtils.getTeams(getActivity());
    for (Team team : teams) {
        if (!teamsAlreadyInGame.contains(team.name)) {
            availableTeams.add(team);
        }
    }
    Collections.sort(availableTeams, Team.NAME_ORDER);
}

From source file:com.github.jobs.ui.activity.JobDetailsActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.job_details_activity);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    if (getIntent() == null || getIntent().getExtras() == null) {
        finish();/*from  ww  w . j  a va2s . c  om*/
        return;
    }
    // get the selected job and the list of ids
    Bundle extras = getIntent().getExtras();
    String jobId = extras.getString(EXTRA_CURRENT_JOB_ID);
    mJobsIds = extras.getStringArrayList(EXTRA_JOBS_IDS);
    mCurrentJobPosition = mJobsIds.indexOf(jobId);

    // prepare the view pager to show current job
    mJobsPager = (ViewPager) findViewById(R.id.jobs_pager);
    mJobsPager.setAdapter(new JobsDetailsAdapter(getSupportFragmentManager(), mJobsIds));
    mJobsPager.setCurrentItem(mCurrentJobPosition);
    mJobsPager.setOnPageChangeListener(this);
    Drawable drawable = getResources().getDrawable(R.drawable.view_pager_separator);
    mJobsPager.setPageMargin(drawable.getIntrinsicWidth());
    mJobsPager.setPageMarginDrawable(drawable);

    getTracker(this).trackPageView(NAME_DETAILS + "?id=" + jobId);
}

From source file:com.keenfin.easypicker.PreviewActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_preview);

    Bundle bundle = getIntent().getExtras();

    int position = 0;
    if (bundle != null && bundle.containsKey(Constants.BUNDLE_ATTACHED_IMAGES)) {
        mImages = bundle.getStringArrayList(Constants.BUNDLE_ATTACHED_IMAGES);
        position = bundle.getInt(Constants.BUNDLE_NEW_PHOTO_PATH, 0);
    }// w  ww  . j  a va  2 s  .c o  m

    if (mImages == null)
        mImages = new ArrayList<>();

    PreviewAdapter adapter = new PreviewAdapter(getSupportFragmentManager(), mImages);
    ViewPager pager = (ViewPager) findViewById(R.id.vp_photos);
    pager.setAdapter(adapter);
    pager.setCurrentItem(position);
}

From source file:com.liferay.mobile.pushnotifications.list.DDLListView.java

@Override
protected void onRestoreInstanceState(Parcelable inState) {
    Bundle state = (Bundle) inState;
    Parcelable superState = state.getParcelable(STATE_SUPER);
    super.onRestoreInstanceState(superState);

    List<String> labelFields = state.getStringArrayList(STATE_LABEL_FIELDS);

    getAdapter().setLabelFields(labelFields);
}