There are an EditText and a TextView in my Activity. I want to set focus on the TextView when the Activity starts. I used the following code:
TextView my
Use this:
EditText mEditText = (EditText) findViewById(R.id.edit_text); TextView myTextView = (TextView) findViewById(R.id.my_text_vew); mEditText.setFocusable(false); myTextView.setFocusable(true);
This takes focus off of the EditText and puts it on the TextView.