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

The following are Jave code examples for showing how to use callOnClick() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DereHelper   File: BaseActivity.java   Source Code and License Vote up 7 votes
@Override
public void onClick(View v) {
    int i = v.getId();
    if (i == R.id.actionBar_btn_start) {
        backBtnAction();
    } else if (i == R.id.actionBar_btn_end) {
        View view1 = findViewById(R.id.actionBar_txtBtn);
        View view3 = findViewById(R.id.actionBar_btn_end_img);
        if (view1.getVisibility() == View.VISIBLE) view1.callOnClick();
        if (view3.getVisibility() == View.VISIBLE) view3.callOnClick();

    }
}
 
Example 2
Project: SLTableView   File: StickyRecyclerHeadersTouchListener.java   Source Code and License Vote up 7 votes
private void viewClick(ViewGroup view, MotionEvent e ) {
    if (inViewInBounds(view, (int) e.getX(), (int) e.getY()) && view.hasOnClickListeners()) {
        view.callOnClick();
    }
    View child;
    for (int i = 0; i < view.getChildCount(); i++) {
        child = view.getChildAt(i);
        if (child instanceof ViewGroup) {
            viewClick((ViewGroup) child, e);
        } else {
            if (inViewInBounds(child, (int) e.getX(), (int) e.getY()) && child.hasOnClickListeners()) {
                child.callOnClick();
            }
        }
    }
}
 
Example 3
Project: AssistantBySDK   File: NaviSetLinePresenter.java   Source Code and License Vote up 6 votes
@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 4
Project: airgram   File: ScrollSlidingTabStrip.java   Source Code and License Vote up 6 votes
public void selectTab(int num) {
    if (num < 0 || num >= tabCount) {
        return;
    }
    View tab = tabsContainer.getChildAt(num);
    if (Build.VERSION.SDK_INT >= 15) {
        tab.callOnClick();
    } else {
        tab.performClick();
    }
}
 
Example 5
Project: PlusGram   File: ScrollSlidingTabStrip.java   Source Code and License Vote up 6 votes
public void selectTab(int num) {
    if (num < 0 || num >= tabCount) {
        return;
    }
    View tab = tabsContainer.getChildAt(num);
    if (Build.VERSION.SDK_INT >= 15) {
        tab.callOnClick();
    } else {
        tab.performClick();
    }
}