Removes object from the bundle. - Android android.os

Android examples for android.os:Bundle

Description

Removes object from the bundle.

Demo Code

import android.os.Bundle;
import java.util.ArrayList;

public class Main{

    /**/*from   w  ww .j  a  v  a 2  s . c  om*/
     * Removes object from the bundle.
     *
     * @param clazz  of object
     * @param bundle to get from
     * @param <T>    type of object
     */
    public static <T> void removeFromBundle(Class<T> clazz, Bundle bundle) {
        if (bundle != null) {
            bundle.remove(clazz.getSimpleName());
        }
    }

}

Related Tutorials