title: android on key long press listener
body: <p>I have  a list view where i need to have continuous scroll if there is long press of up or down
  and want to have single navigation of list if there is short press of up or down key.I have tried using on key long press listener  but every time when  click the up or down button it enters the on key up listener or on key down listener.</p>
  
  <pre><code>    @Override
  public boolean onKeyLongPress(int keyCode, KeyEvent event) {
      // TODO Auto-generated method stub
  
  
      switch(keyCode)
      {
      case 23:
          Log.v("onkeylong_pressed","onkey_longpressed="+keyCode);
          return true;
      case 21:
          Log.v("onkeylong_pressed","onkey_longpressed="+keyCode);
          return true;
      case KeyEvent.KEYCODE_DPAD_DOWN:
  
          Log.v("onkeylong_pressed","onkey_longpressed="+keyCode);
  
          return true;
      }
      //return true;
      return super.onKeyLongPress(keyCode, event);
  }
  
  
  @Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
      scroll.setSmoothScrollingEnabled(false);
      WheelView wheelView = getWheel(R.id.category_wheel);
      int currentItemIndex = wheelView.getCurrentItem();
  
  
  
      switch (keyCode) {
  
      case KeyEvent.KEYCODE_DPAD_DOWN:
  
               wheelView.setCurrentItem(currentItemIndex + 1);
  
          return true;
  
      case KeyEvent.KEYCODE_DPAD_UP:
  
          if (currentItemIndex == 0) {
              currentItemIndex = itemsList.size() - 1;
          }
          scroll.setScrollX(0);
          wheelView.setCurrentItem(currentItemIndex - 1);
  
          Index_Right=0;x=150;
  
  
          return true;
  
      case KeyEvent.KEYCODE_DPAD_RIGHT:
  
  
          return true;
      case KeyEvent.KEYCODE_DPAD_LEFT:
  
  
          return true;
      }   
  
  
  
      return super.onKeyUp(keyCode, event);
  }
  
     @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      // TODO Auto-generated method stub
      switch(keyCode){
      case KeyEvent.KEYCODE_DPAD_DOWN:
          long_Press=true;
  
          event.startTracking();
  
  
          return true;
      }
      return super.onKeyDown(keyCode, event);
  
  }
  </code></pre>
  
  <p>Can any one please help me out.Thanks in advance.</p>