Example usage for android.view KeyEvent FLAG_SOFT_KEYBOARD

List of usage examples for android.view KeyEvent FLAG_SOFT_KEYBOARD

Introduction

In this page you can find the example usage for android.view KeyEvent FLAG_SOFT_KEYBOARD.

Prototype

int FLAG_SOFT_KEYBOARD

To view the source code for android.view KeyEvent FLAG_SOFT_KEYBOARD.

Click Source Link

Document

This mask is set if the key event was generated by a software keyboard.

Usage

From source file:info.staticfree.android.units.Units.java

private void sendTextAsSoftKeyboard(String text) {
    dispatchKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), text, Units.class.hashCode(),
            KeyEvent.FLAG_SOFT_KEYBOARD));
}

From source file:info.staticfree.android.units.Units.java

private void sendTextAsSoftKeyboard(String text, boolean moveToDefault) {
    dispatchKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), text, Units.class.hashCode(),
            KeyEvent.FLAG_SOFT_KEYBOARD));
    if (moveToDefault) {
        workspace.moveToDefaultScreen();
    }// w w w . j  a  v  a  2  s  .c  o  m
}

From source file:com.tct.mail.ui.AbstractActivityController.java

@Override
public final boolean onKeyDown(int keyCode, KeyEvent event) {
    //[FRETURE]-ADD-BEGIN by TSNJ.wei huang 11/24/2014 FR848855
    if (keyCode == event.KEYCODE_BACK) {
        if (mCabActionMenu != null) {
            if (mCabActionMenu.isActivated()) {
                if (mCabActionMenu.isActionModeNull()) {
                    return false;
                } else {
                    mCabActionMenu.onSetEmpty();
                }//from  ww  w  .j  a v a  2 s.co  m
                return true;
            } else {
                return false;
            }
        }
    }
    //[FEATURE]-ADD-END by TSNJ.wei huang

    // TS: gangjin.weng 2015-4-5 EMAIL BUGFIX-968391 ADD_S
    if (keyCode == KeyEvent.KEYCODE_DEL && mCabActionMenu == null && event != null && event.getScanCode() == 0
            && event.getMetaState() == 0
            && event.getFlags() == (KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE)) {
        return true;
    }
    // TS: gangjin.weng 2015-4-5 EMAIL BUGFIX-968391 ADD_E
    return false;
}