View.OnClickListener onClick - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for View.OnClickListener onClick method.

This code example shows how to use the following methods:onClick
            final OnClickListener listener) {
        return append(text, new URLSpan(text.toString()) {
 
            @Override 
            public void onClick(View widget) {
                listener.onClick(widget);
            } 
        }); 
    } 
 
    /** 
     * Append text as URL 
     * 
     * @param text 
     * @return this text 
     */ 
    public StyledText url(final CharSequence text) {
        return append(text, new URLSpan(text.toString()));
    } 
 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
				zoomControls.setVisibility(View.VISIBLE);
			} 
			scheduleControlTimeout(); 
		} 
		if (sendClick && clickListener != null) {
			clickListener.onClick(view);
		} 
	} 
 
	private void handleScaleUp() 
	{ 
		if (scaleFactor < scaleMax) {
			onViewChanged(scaleIncrement);
		} 
	} 
 
	private void handleScaleDown() 
	{ 
		if (scaleFactor > scaleMin) {
			onViewChanged(-scaleIncrement);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
 
    // EVENT HANDLERS 
    public void onClick(View view) {
        if (enabled) {
            if (secondaryOnClickListener != null)
                secondaryOnClickListener.onClick(view);
            if (onItemClickListener != null)
                onItemClickListener.onItemClick(null,
                        getChildAt(getLastIndex()), getLastIndex(),
                        getLastIndex() / colCount);
        } 
    } 
 
    void toggleAddDelete(boolean delete) {
        int resid = R.drawable.ic_menu_add;
        int stringid = R.string.profiles_add;
        if (delete) {
            resid = R.drawable.ic_menu_delete_holo_dark;
            stringid = R.string.dialog_delete_title;
        } 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
 
    @Override 
    public void onClick(View view) {
        updateTransitionDrawable(false); 
        if (mClickListener != null) {
            mClickListener.onClick(view);
        } 
    } 
 
    public void setIgnoreRequestLayout(boolean ignore) {
        mIgnoreRequestLayout = ignore;
    } 
 
    @Override 
    public void requestLayout() { 
        if (!mIgnoreRequestLayout) {
            super.requestLayout(); 
        } 
    } 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
            @Override 
            public void onClick(View v) {
                ScaleAnimation scale = new ScaleAnimation(.95f, 1f, .95f, 1f, Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
                scale.setDuration(250);
                view.startAnimation(scale);
                listener.onClick(view);
            } 
        }); 
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
        } 
    } 
 
    @Override 
    public final void onClick(View v) {
        mOnClick.onClick(v);
    } 
 
    protected void startActivity(String action){
        Intent intent = new Intent(action);
        startActivity(intent);
    } 
 
    protected void startActivity(Intent intent) {
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
        mContext.startActivity(intent);
        collapsePanels(); 
    } 
 
    protected void collapsePanels() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
            button.setOnClickListener(new View.OnClickListener() {
                @Override 
                public void onClick(View v) {
                    dismiss();
                    if (onClickListener != null) {
                        onClickListener.onClick(v);
                    } 
                } 
            }); 
        } 
    } 
 
    public static void error(Activity ctx, CharSequence msg) {
        error(ctx, msg, null, null);
    } 
 
    public static void error(Activity ctx, CharSequence msg, Throwable t) {
        error(ctx, msg, t, null);
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
			lc.terminateAllCalls();
		} else { 
			lc.terminateCall(lc.getCurrentCall());
		} 
 
		if (externalClickListener != null) externalClickListener.onClick(v);
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
	} 
 
	@Override 
	public void onClick(View widget) {
		if( this.onClickListener != null ){
			this.onClickListener.onClick(widget);
		} 
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:onClick
		mListener = listener;
	} 
 
	@Override 
	public void onClick(View widget) {
		mListener.onClick(widget);
	} 
} 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java

Related View.OnClickListener onClick Questions & Answers:

onClick Method Overview
Called when a view has been clicked.
See Code Examples for other Android View.OnClickListener Methods: