get Bundle from two Bundle - Android Android OS

Android examples for Android OS:Bundle Get

Description

get Bundle from two Bundle

Demo Code


//package com.book2s;

import android.os.Bundle;

public class Main {
    public static Bundle getBundle(Bundle oldBundle, Bundle newBundle) {
        if (oldBundle == null) {
            if (newBundle == null) {
                return new Bundle();
            } else {
                return newBundle;
            }//  w ww .  j  a v a2  s .c  o m
        } else {
            if (newBundle == null) {
                return new Bundle();
            } else {
                oldBundle.putAll(newBundle);
                return oldBundle;
            }
        }
    }
}

Related Tutorials