Code example for EditText

Methods: setEnabled, isFocusable, setFocusable

0
		final Button b = new Button(parentView.getContext());
		b.setText("Lock Input");
		b.setOnClickListener(new OnClickListener() {
			@Override 
			public void onClick(View v) {
				myEditText.setFocusable(!myEditText.isFocusable());
				b.setFocusable(false);
				b.setVisibility(View.GONE);
				myEditText.setEnabled(false);
			} 
		}); 
 
		myLinLayout.addView(b);
 
		return myLinLayout;
	} 
 
	/** 
	 * Only a wrapper method to make life easier ;) 
	 *  
	 * @param myTargetActivity