create Bundle by key value pair - Android Android OS

Android examples for Android OS:Bundle Key

Description

create Bundle by key value pair

Demo Code


//package com.book2s;
import android.os.Bundle;

public class Main {
    private static final String EXTRA_ZEN_MODE = "zen_mode";

    public static Bundle create(int selectedZenMode) {
        Bundle bundle = new Bundle();
        bundle.putInt(EXTRA_ZEN_MODE, selectedZenMode);

        return bundle;
    }//from   www. j  av  a 2 s. c om
}

Related Tutorials