Code example for SparseArray

Methods: get

0
        Intent intent = null;
 
        // First try the exact keycode (with modifiers). 
        int shortcut = kcm.get(keyCode, metaState);
        if (shortcut != 0) {
            intent = mShortcutIntents.get(shortcut);
        } 
 
        // Next try the primary character on that key. 
        if (intent == null) {
            shortcut = Character.toLowerCase(kcm.getDisplayLabel(keyCode));
            if (shortcut != 0) {
                intent = mShortcutIntents.get(shortcut);
            } 
        } 
 
        return intent;
    } 
 
}