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 ?

4

2 回答 2

1

看看这个问题:

阻止 EditText 在 Activity 启动时获得焦点?

于 2010-11-19T05:05:10.853 回答
0

这对我有用......我只是将这一行放在清单上的活动定义中。

 <activity
                ...
             android:windowSoftInputMode="stateHidden" >
 </activity>
于 2012-10-04T18:17:52.080 回答