0

I am using a ListView in which when I long-press the down or up button the list should scroll continuously until the button is released. I have tried with onKeyLongPress but it's not detecting the long press of my key. Can any one help me out?

Jeff B
  • 8,572
  • 17
  • 61
  • 140
Nik
  • 111
  • 2
  • 8
  • 1
    are you using a listenerer added on `fragment` or `activity` for listen the event? Can you show us some code? – Manuel Spigolon Mar 18 '14 at 13:00
  • This may answer your question: http://stackoverflow.com/a/7985901/945456. It looks you may need to detect the same key event in the `onKeyPress` handler and start tracking it there first. – Jeff B Mar 18 '14 at 13:02
  • I am designing a set top box where remote keys are used to control over it. – Nik Mar 20 '14 at 04:16

1 Answers1

0
listview.setOnItemLongClickListener(new OnItemLongClickListener() {
    @Override
    public boolean onItemLongClick(AdapterView<?> arg0, View arg1, 
                                   int arg2, long arg3) {
        //code 
        return false;
    }
});

But you should put your code so we can help you to identify the problem

Jeff B
  • 8,572
  • 17
  • 61
  • 140
Android
  • 8,995
  • 9
  • 67
  • 108