How to remove request focus from EditText?

I want to remove the blue line from edittext when I touch edittext, but I do not know how to remove it. see image for more understandingenter image description here

+5
source share
3 answers

do it like that

lUserNameEditText.clearFocus();

another way that works for me regarding the border,

lUserNameEditText.setBackgroundColor(0); 
+8
source

You tried to change Layout XMLas follows

<EditText  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:hint="Password" 
android:background="#00000000"
/>

or do it with code

editTextView.setBackgroundColor(0);
+4
source

remove requestFocus tag in xml layout to automatically focus on losses

+1
source

All Articles