Check if Bundle contains a value via key - Android android.os

Android examples for android.os:Bundle

Description

Check if Bundle contains a value via key

Demo Code

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

public class Main{

    public static boolean contains(Bundle bundle, String key) {
        return bundle != null && bundle.containsKey(key);
    }//from w  w w  .  java  2s. c o  m

}

Related Tutorials