public static boolean inputKeyFunction(int key) { if (key < 0) return false; if (key >= functionKeyActions.length) return false; Action action = functionKeyActions[key]; if (action == null) return false; return action.performAction(); }
@Override public void onClick(View view) { final Object tag = view.getTag(); if (tag instanceof Action) { final Action action = (Action) tag; action.performAction(view); } }