0

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 ?

Animesh
  • 4,926
  • 14
  • 68
  • 110
Ads
  • 6,681
  • 12
  • 47
  • 72

2 Answers2

1

Take a look at this question:

Stop EditText from gaining focus at Activity startup?

Community
  • 1
  • 1
Cristian
  • 198,401
  • 62
  • 356
  • 264
0

That worked for me... I just put this line in the activity definition on Manifest.

 <activity
                ...
             android:windowSoftInputMode="stateHidden" >
 </activity>
Leonardo Cardoso
  • 1,164
  • 2
  • 12
  • 22