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

The following examples show how to use android.view.View#callOnClick() . 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 check out the related API usage on the sidebar.
Example 1
Source File: WeSwipeHelper.java    From monero-wallet-android-app with MIT License 6 votes vote down vote up
/**
 * 判断当前点击的位置是否为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
Source File: NaviSetLinePresenter.java    From AssistantBySDK with Apache License 2.0 5 votes vote down vote up
@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 File: MsgListAdapter.java    From aurora-imui with 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 File: ExpirationDateDialog.java    From android-card-form with 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
Source File: AboutAdapter.java    From Weather with GNU General Public License v3.0 4 votes vote down vote up
About3ViewHolder(View view) {
    super(view);
    this.context = view.getContext();
    view.callOnClick();
    setUpOnClick(view);
}