How to disable immediate focus in TextInputLayout?

Ardi picture Ardi · Sep 28, 2015 · Viewed 18.5k times · Source

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 !

Answer

subhash picture subhash · Sep 28, 2015

in your root view use this attribute:

        android:focusableInTouchMode="true"