Niks
Niks

Reputation: 587

How to Remove Request Focus from EditText?

I want to remove the blue line from edittext when i touched edittext it appear but i dont know how to remove it. see the picture for more understandingenter image description here

Upvotes: 8

Views: 5769

Answers (3)

Girish Nair
Girish Nair

Reputation: 5216

Have you tried changing the Layout XML like this

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

or do it via code

editTextView.setBackgroundColor(0);

Upvotes: 4

srinivas
srinivas

Reputation: 161

remove requestFocus tag in xml layout so automatically focus will loss

Upvotes: 1

nano_nano
nano_nano

Reputation: 12523

do it this way

lUserNameEditText.clearFocus();

another way which works for me regarding the border is

lUserNameEditText.setBackgroundColor(0); 

Upvotes: 14

Related Questions