public static class EmojiconsFragment.RepeatListener
extends java.lang.Object
implements android.view.View.OnTouchListener
A class, that can be used as a TouchListener on any view (e.g. a Button). It cyclically runs a clickListener, emulating keyboard-like behaviour. First click is fired immediately, next before initialInterval, and subsequent before normalInterval.
Interval is scheduled before the onClick completes, so it has to run fast. If it runs slow, it does not generate skipped onClicks.
| Constructor and Description |
|---|
RepeatListener(int initialInterval,
int normalInterval,
android.view.View.OnClickListener clickListener) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
onTouch(android.view.View view,
android.view.MotionEvent motionEvent) |
public RepeatListener(int initialInterval,
int normalInterval,
android.view.View.OnClickListener clickListener)
initialInterval - The interval before first click eventnormalInterval - The interval before second and subsequent click
eventsclickListener - The OnClickListener, that will be called
periodically