Code example for KeyEvent

Methods: getActiongetRepeatCountisSystem

0
                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();
    } 
 
    @Override 
    protected void onFinishInflate() { 
        super.onFinishInflate(); 
 
        mSearchText = (TextView) findViewById(R.id.search_src_text);