Code example for CheckBox

Methods: setText

	private CheckBox mButton;
	private void init() { 
		mButton = new CheckBox(getContext());
		mButton.setText("Click Anywhere On Screen");
		addView(mButton, new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.CENTER));
	 * TouchDelegate is applied to this view (parent) to delegate all touches 
	 * within the specified rectangle to the CheckBox (child).  Here, the rectangle 
	 * is the entire size of this parent view. 
	 * This must be done after the view has measured itself so we know how big to make the rect, 
	 * thus we've chosen to add the delegate in onMeasure() 
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {