Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable immediate focus in TextInputLayout?

I use TextInputLayout (+ search) in my NavigationDrawer. When user toggle this drawer, the cursor focus appears immediately on TextInputLayout field.

enter image description here

Is it possible not to get focus on this field until user will click on it?

Thanks !

like image 610
Ardi Avatar asked Sep 28 '15 17:09

Ardi


People also ask

How do I remove the default padding in TextInputLayout?

You can just set the start and end padding on the inner EditText to 0dp. Here's a screenshot with Show Layout Bounds turned on so you can see that the hints go all the way to the edge of the view. Save this answer.

How do I remove TextInputLayout error?

setError(..) for new error and input. setErrorEnabled(false) to remove it.


1 Answers

in your root view use this attribute:

        android:focusableInTouchMode="true" 
like image 181
subhash Avatar answered Sep 29 '22 19:09

subhash