Beispiel #1
0
 @Override
 public void onClick(View v) {
   dismiss();
   if (v == cancel) {
     if (listenerCancel != null) listenerCancel.onClick(cancel);
   } else if (v == ok) {
     if (listenerOk != null) listenerOk.onClick(ok);
   } else if (v == complete) {
     if (listenerOk != null) listenerOk.onClick(ok);
   } else if (v == mCloseBtn) {
     if (listenerClose != null) listenerClose.onClick(v);
   }
 }
Beispiel #2
0
 @Override
 public void onClick(View v) {
   super.onClick(v);
   if (mExtraOnClickListener != null) {
     mExtraOnClickListener.onClick(v);
   }
 }
Beispiel #3
0
 @Override
 public void onClick(View v) {
   dismiss();
   if (mListener != null) {
     mListener.onClick(v);
   }
 }
 @Override
 public void onClick(final View view) {
   if (mActionMode != null) {
     toggleViewActivatedState(view);
   } else if (mClickListener != null) {
     mClickListener.onClick(view);
   }
 }
  @Override
  public void onClick(View view) {
    MotionEvent motionEvent = DroidMotionEventImpl.createMotionEventNative("click", 0, 0);

    dispatch("click", motionEvent);

    if (clickListener != null) clickListener.onClick(view);
  }
Beispiel #6
0
 @Implementation
 public boolean performClick() {
   if (onClickListener != null) {
     onClickListener.onClick(realView);
     return true;
   } else {
     return false;
   }
 }
Beispiel #7
0
 @Override
 public void run() {
   if (downView == null) {
     return;
   }
   handler.removeCallbacksAndMessages(downView);
   handler.postAtTime(this, downView, SystemClock.uptimeMillis() + normalInterval);
   clickListener.onClick(downView);
 }
  public void setCurrentTab(int index) {
    Pair<View, View> tab = tabs.get(index);
    clearItemState();
    // END
    // FIXME denan.wang; 2015/2/25;
    //        tab.first.callOnClick();
    //        tab.first.performClick();
    onSelectorClickListener.onClick(tab.first);
    // END

    if (selector != null) {
      selector.moveTo(index, isSelectorSmoothScroll);
    }
  }
Beispiel #9
0
  public static void setOnRippleClickListener(
      @NonNull final View targetView, @Nullable final View.OnClickListener onClickListener) {
    if (onClickListener == null) {
      targetView.setOnClickListener(null);
      return;
    }

    final Runnable runnable = () -> onClickListener.onClick(targetView);

    targetView.setOnClickListener(
        v -> {
          RIPPLE_HANDLER.removeCallbacksAndMessages(null);
          RIPPLE_HANDLER.postDelayed(runnable, RIPPLE_EFFECT_DELAY);
        });
  }
Beispiel #10
0
 public boolean onTouch(View view, MotionEvent motionEvent) {
   switch (motionEvent.getAction()) {
     case MotionEvent.ACTION_DOWN:
       downView = view;
       handler.removeCallbacks(handlerRunnable);
       handler.postAtTime(
           handlerRunnable, downView, SystemClock.uptimeMillis() + initialInterval);
       clickListener.onClick(view);
       return true;
     case MotionEvent.ACTION_UP:
     case MotionEvent.ACTION_CANCEL:
     case MotionEvent.ACTION_OUTSIDE:
       handler.removeCallbacksAndMessages(downView);
       downView = null;
       return true;
   }
   return false;
 }
Beispiel #11
0
 @Override
 public void onClick(View v) {
   if (clickListener != null) {
     clickListener.onClick(v);
   }
 }
 @Test
 public void testOnBack() {
   buttonClick.onClick(null);
   verify(parent).goBack();
 }
 @Override
 public void onClick(View v) {
   // TODO Auto-generated method stub
   if (click != null) click.onClick(v);
   dialog.dismiss();
 }
 @Override
 public void onClick(View view) {
   if (listener != null) listener.onClick(view);
 }