We can set error in Edittext successfully but failed to set in textview. is there any problem?? i tried
((TextView) findViewById(R.id.df)).requestFocus(); ((
Default TextView is NOT focusable. So, you need to set android:focusable="true" and android:focusableInTouchMode="true".
And no need to set setSelected(true).
((TextView) findViewById(R.id.df)).requestFocus(); ((TextView) findViewById(R.id.df)).setError("akjshbd");