Why not catch a MotionEvent and check for ACTION_DOWN (start rolling the dice) and for ACTION_UP (stop rolling the dice).
On Feb 13, 12:11 pm, Ricky <arsenickiss7...@gmail.com> wrote: > i have search and have not found a solution to my problem. > > my problem is that, i am trying to create a loop while the button is > LongClicked. currently when i long click, the moreDice() method is > only called once. i need to create a loop that will keep calling the > moreDice() untill the user nolonger LongClick's the buttton. > > here is my simple code example: > > // + Button on LongClick > up.setOnLongClickListener(new View.OnLongClickListener() { > @Override > public boolean onLongClick(View v) { > moreDice(); > //return true because event has been handled, > do not pass onto any > other listeners > return true; > } > }); > > thanks in advanced, > -ricky -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en