Code example for KeyEvent

Methods: getActiongetRepeatCountisSystem

                case KeyEvent.ACTION_DOWN:
                    return mLauncher.onKeyDown(keyCode, event);
                case KeyEvent.ACTION_MULTIPLE:
                    return mLauncher.onKeyMultiple(keyCode, event.getRepeatCount(), event);
                case KeyEvent.ACTION_UP:
                    return mLauncher.onKeyUp(keyCode, event);
        return false; 
     * Implements OnLongClickListener to pass long clicks on child views  
     * to the widget. This makes it possible to pick up the widget by long 
     * clicking on the text field or a button. 
    public boolean onLongClick(View v) {
        return performLongClick();
    protected void onFinishInflate() { 
        mSearchText = (TextView) findViewById(;