@@ -0,0 +1,2293 @@
+package br.com.mirabilis.view.listener;%0A%0Aimport android.os.Handler;%0Aimport android.view.MotionEvent;%0Aimport android.view.View;%0Aimport android.view.View.OnClickListener;%0Aimport android.view.View.OnTouchListener;%0A%0A/**%0A * Classe de repetio de OnClickListener, utilizada at a verso 14 do Android, aonde tem como objetivo disparar o onClickListener enquanto o View estiver sendo pressionado.%0A * @author Rodrigo Simes Rosa & Anderson Lasak.%0A */%0Apublic class RepeatListener implements OnTouchListener %7B%0A%09%0A%09private MotionEvent currentMotionEvent;%0A%09private int initialInterval;%0A%09private final int normalInterval;%0A%09private final OnClickListener clickListener;%0A%09private View currenView;%0A%09private Handler handler = new Handler();%0A%09%0A%09/**%0A%09 * Runnable responsvel pela iterao das repeties.%0A%09 */%0A%09private Runnable runnable = new Runnable() %7B%0A%09%09public void run() %7B%0A%09%09%09if(currentMotionEvent.getAction() == MotionEvent.ACTION_DOWN %7C%7C currentMotionEvent.getAction() == MotionEvent.ACTION_MOVE)%7B%0A%09%09%09%09handler.postDelayed(this, normalInterval);%0A%09%09%09%09clickListener.onClick(currenView);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D;%0A%0A%09/**%0A%09 * Listener para repetio de chamadas onClickListener.%0A%09 * @param initialInterval Tempo para iniciar a repetio.%0A%09 * @param normalInterval Tempo em que a repetio ocorre.%0A%09 * @param clickListener OnClickListener que ser executado nas repeties.%0A%09 */%0A%09public RepeatListener(int initialInterval, int normalInterval, OnClickListener clickListener) %7B%0A%09%09if (clickListener == null) throw new IllegalArgumentException(%22null runnable%22);%0A%0A%09%09if (initialInterval %3C 0 %7C%7C normalInterval %3C 0)%7B%0A%09%09%09throw new IllegalArgumentException(%22Adicione intervalos vlidos%22);%0A%09    %7D%0A%09%09%0A%09%09this.initialInterval = initialInterval;%0A%09    this.normalInterval = normalInterval;%0A%09    this.clickListener = clickListener;%0A%09%7D%0A%0A%09public boolean onTouch(View view, MotionEvent motionEvent) %7B%0A%09%09this.currentMotionEvent = motionEvent;%09%0A%09%09switch (motionEvent.getAction()) %7B%0A%09    %09case MotionEvent.ACTION_DOWN:%0A%09    %09%09handler.removeCallbacks(runnable);%0A%09%09        handler.postDelayed(runnable, initialInterval);%0A%09%09        currenView = view;%0A%09%09        clickListener.onClick(view);%0A%09%09        break;%0A%09%09        %0A%09    %09case MotionEvent.ACTION_UP:%0A%09    %09%09handler.removeCallbacks(runnable);%0A%09    %09%09currenView = null;%0A%09            break;%0A%09    %7D%0A%09    return false;%0A%09%7D%0A%7D%0A%0A

Revert "Revert "Revert "Revert "RepeatListener""""