Code example for TouchDelegate

0
	@Override 
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
		//Apply the whole area of this view as the delegate area 
		Rect bounds = new Rect(0, 0, getMeasuredWidth(), getMeasuredHeight());
		TouchDelegate delegate = new TouchDelegate(bounds, mButton);
		setTouchDelegate(delegate);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE