count Indexes in Bundle - Android Android OS

Android examples for Android OS:Bundle

Description

count Indexes in Bundle

Demo Code


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

public class Main {
    public static int countIndexes(Bundle bundle, String baseKey) {
        int count = 0;
        while (bundle.containsKey(baseKey + count))
            count++;//from   w  w w .j  a v  a  2s .co m
        return count;
    }
}

Related Tutorials