Search code examples
androidandroid-activityonfocusoncreate

Android default onfocus on autofocus and editview,How to remove that?


In my application I have a autocomplete in first activity and some edittext in second activity.

When I run my code in emulator it works fine and I am not seeing any virtual keyboard on screen when program is excecuted.

But when I deploy it in device when the application loads, onfocus is directly on autocomplete and a keyboard pops out, and also when I navigate from first activity to second activity onfocus is on first edittext and keyboard pops out.

I want to disable this onfocus on all the page. how to do that ?


Solution

  • Take a look at this question:

    Stop EditText from gaining focus at Activity startup?