Search in sources :

Example 26 with KeyboardShortcutGroup

use of android.view.KeyboardShortcutGroup in project android_frameworks_base by crdroidandroid.

the class KeyboardShortcuts method getSystemShortcuts.

private KeyboardShortcutGroup getSystemShortcuts() {
    final KeyboardShortcutGroup systemGroup = new KeyboardShortcutGroup(mContext.getString(R.string.keyboard_shortcut_group_system), true);
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_home), KeyEvent.KEYCODE_ENTER, KeyEvent.META_META_ON));
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_back), KeyEvent.KEYCODE_DEL, KeyEvent.META_META_ON));
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_recents), KeyEvent.KEYCODE_TAB, KeyEvent.META_ALT_ON));
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_notifications), KeyEvent.KEYCODE_N, KeyEvent.META_META_ON));
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_shortcuts_helper), KeyEvent.KEYCODE_SLASH, KeyEvent.META_META_ON));
    systemGroup.addItem(new KeyboardShortcutInfo(mContext.getString(R.string.keyboard_shortcut_group_system_switch_input), KeyEvent.KEYCODE_SPACE, KeyEvent.META_META_ON));
    return systemGroup;
}
Also used : KeyboardShortcutGroup(android.view.KeyboardShortcutGroup) KeyboardShortcutInfo(android.view.KeyboardShortcutInfo)

Aggregations

KeyboardShortcutGroup (android.view.KeyboardShortcutGroup)26 KeyboardShortcutInfo (android.view.KeyboardShortcutInfo)21 ArrayList (java.util.ArrayList)6 ComponentName (android.content.ComponentName)5 PackageInfo (android.content.pm.PackageInfo)5 Bitmap (android.graphics.Bitmap)5 Canvas (android.graphics.Canvas)5 Icon (android.graphics.drawable.Icon)5 RemoteException (android.os.RemoteException)5 LayoutInflater (android.view.LayoutInflater)5 MenuItem (android.view.MenuItem)5 View (android.view.View)5 ViewGroup (android.view.ViewGroup)5 KeyboardShortcutsReceiver (android.view.WindowManager.KeyboardShortcutsReceiver)5 ImageView (android.widget.ImageView)5 LinearLayout (android.widget.LinearLayout)5 RelativeLayout (android.widget.RelativeLayout)5 TextView (android.widget.TextView)5 AssistUtils (com.android.internal.app.AssistUtils)5 TargetApi (android.annotation.TargetApi)1