> You can use android:softInputMode to control this behavior as introduced > here:
Thanks Diane. I'm sure I'm just missing something, but I've never gotten this to have any effect. Whether I do this in the manifest: <activity android:name="name" android:windowSoftInputMode="stateHidden"> or in the activity code: getWindow().setSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); it seems to have no effect at all, no matter which setting I use. On the G1 and emulator I still get my screen coming up with the EditText having focus, but with no soft keyboard until I touch the EditText, at which point it appears (which is exactly what I want, assuming the keyboard is hidden--the problem is that the Galaxy apparently displays the soft keyboard without the user tapping the EditText). Here's the EditText layout: <EditText android:id="@+id/searchText" android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:singleLine="true" android:hint="@string/search_hint" android:imeOptions="actionDone|flagNoExtractUi" /> (BTW the imeOptions:flagNoExtractUi never worked for me either, I opened defect 2792 for it but it's never been addressed.) In my code I'm just doing: EditText search = (EditText)findViewById(R.id.searchText); search.addTextChangedListener(searchWatcher); search.requestFocus(); So what am I doing wrong here? > The behavior between devices with and without hard keyboards is indeed > different because... well, there being a hard keyboard significant impacts > how you use the soft keyboard on a device. But if I have a G1 with the keyboard closed, why would the default behavior be any different from a phone without a keyboard? As a user I'd expect it to behave the same, e.g. in my case when I go to enter text into an input field the soft keyboard pops up if I have the keyboard hidden, which is what I'd want it to do on a phone without a keyboard too. Thanks for your help Diane. -- Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

