Hello, I need to generate/trigger a long key press event of a button in Android. Searched on net but not able to find any answers. Any solutions ??????/
Thanks in advance.
Hello, I need to generate/trigger a long key press event of a button in Android. Searched on net but not able to find any answers. Any solutions ??????/
Thanks in advance.
Can't you just start a TimerTask when you push the button, with 1 second delay, and just stop the timer if you release the button within that time?
You can set Long key press on button like:
btnNext.setLongClickable(true);
btnNext.setOnLongClickListener(l)