android:focusableInTouchMode - How toDeny Focus to an Edittext

How to Deny Focus to an EditText

android:focusableInTouchMode was added in API Level 1

Boolean that controls whether a view can take focus while in touch mode. If this is true for a view, that view can gain focus when clicked on, and can keep focus if another view is clicked on that doesn't have this attribute set to true.
This makes the EditText not editable with the keyboard. They keyboard will not display by default. The user can select, copy and cut data from the EditText still. The users IS able to paste data to the EditText still.

1. Add an EditText in your main.xml file.

2. In the main.xml file, add the code below.

  <EditText
        ...
       android:focusableInTouchMode = "false"
  />

3. Compile and run!

Related Articles:

Resources:
http://developer.android.com/reference/android/view/View.html#attr_android:focusableInTouchMode
http://developer.android.com/reference/android/R.attr.html#focusableInTouchMode