Ardi Ardi - 1 year ago 180
Android Question

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 !

Answer Source

in your root view use this attribute:

        android:focusableInTouchMode="true"