Java Code Examples for android.view.View#callOnClick()

The following examples show how to use android.view.View#callOnClick() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
/**
 * 判断当前点击的位置是否为view并且该View实现了OnClickListener事件
 *
 * @param x
 * @param y
 */
private void doChildClickEvent(float x, float y) {
    RecyclerView.ViewHolder viewHolder;
    if (null == mSelected && null == mPreOpened) {
        return;
    }
    if (null != mPreOpened) {
        viewHolder = mPreOpened;
    } else {
        viewHolder = mSelected;
    }
    View consumeEventView = viewHolder.itemView;
    if (consumeEventView instanceof ViewGroup) {
        consumeEventView = findConsumeView((ViewGroup) consumeEventView, x, y);
    }
    if (consumeEventView != null) {
        consumeEventView.callOnClick();
        mClick = false;
        if (viewHolder instanceof SwipeLayoutTypeCallBack) {
            if (((SwipeLayoutTypeCallBack) viewHolder).needRecoveryOpened()) {
                recoveryOpenedPreItem(viewHolder);
            }
        }
    }
}
 
Example 2
@Override
public void showFullLine() {
    if (routeInputs.size() > 1) {
        View mTotalFullviewPanel = RGMapModeViewControllerProxy.getInstance().getView().findViewById(1711866150);
        if (mTotalFullviewPanel != null) {
            Log.i(TAG, "mTotalFullviewPanel.callOnClick()");
            mTotalFullviewPanel.callOnClick();
        } else {
            naviManager.zoomToRouteBound(routeInputs.get(0), routeInputs.get(routeInputs.size() - 1));
        }
    }
}
 
Example 3
Source Project: aurora-imui   File: MsgListAdapter.java    License: MIT License 5 votes vote down vote up
private View.OnLongClickListener getMessageLongClickListener(final Wrapper<MESSAGE> wrapper) {
    return new View.OnLongClickListener() {
        @Override
        public boolean onLongClick(View view) {
            if (mSelectionListener == null) {
                notifyMessageLongClicked(view, wrapper.item);
                return true;
            } else {
                mIsSelectedMode = true;
                view.callOnClick();
                return true;
            }
        }
    };
}
 
Example 4
Source Project: android-card-form   File: ExpirationDateDialog.java    License: MIT License 5 votes vote down vote up
@Override
public boolean onTouchEvent(final MotionEvent event) {
    boolean closeOnTouch = (event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(event)
            && getWindow().peekDecorView() != null);
    if (isShowing() && closeOnTouch) {
        View rootView = getOwnerActivity().getWindow().getDecorView().getRootView();
        final View selectedView;
        if (rootView instanceof ViewGroup) {
            selectedView = findViewAt((ViewGroup) rootView, (int) event.getRawX(), (int) event.getRawY());
        } else {
            selectedView = null;
        }

        if (selectedView != null && selectedView != mEditText) {
            dismiss();

            if (selectedView instanceof EditText) {
                selectedView.requestFocus();
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        ((InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE))
                                .showSoftInput(selectedView, 0);
                    }
                }, mAnimationDelay);
            } else if (selectedView instanceof Button) {
                selectedView.callOnClick();
            }
        } else if (selectedView == null) {
            dismiss();
        }

        return true;
    }

    return false;
}
 
Example 5
About3ViewHolder(View view) {
    super(view);
    this.context = view.getContext();
    view.callOnClick();
    setUpOnClick(view);
}