Hi, I have a similar problem. I want that no softkeyboard appears, when I tap on one of my textedit fields, because I've created some buttons to do the input. I've tryed out some code like this:
InputMethodManager in = (InputMethodManager)getSystemService (Context.INPUT_METHOD_SERVICE); in.hideSoftInputFromWindow(findViewById (R.id.EditText01).getApplicationWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); But it didn't work. What can I do to make it work the way I want? Can anyone give me some sample code? Tank you, Sandro On 29 Apr., 17:59, simon <simonse...@gmail.com> wrote: > Thanks, it worked. > > On Apr 29, 1:32 am, Dianne Hackborn <hack...@android.com> wrote: > > > The method you want is this: > > >http://developer.android.com/reference/android/view/inputmethod/Input..., > > int) > > > The token is retrieved with this: > > >http://developer.android.com/reference/android/view/View.html#getWind...() > > > On Tue, Apr 28, 2009 at 12:03 PM, simon <simonse...@gmail.com> wrote: > > > > Using the 1.5 SDK. I have an application with a TabActivity and when I > > > change from one tab with edit fields to another that does not need any > > > user input I would like the virtual keyboard to be hidden. I've tried > > > setting android:windowSoftInputMode="stateAlwaysHidden" on the > > > manifest for the activity that doesn't need user input but it didn't > > > work (maybe because the activity is triggered by a TabActivity). > > > > I've found the method hideSoftInputMethod(IBinder, int) in the > > > InputMethodManager class but I don't know how to get the IBinder > > > object that this method needs. > > > > How do I get that IBinder object? Are there other ways to hide the > > > soft keyboard? > > > > It would be even better if I could make the soft keyboard > > > automatically hide when an EditText loses focus. > > > > Any help will be appreciated. > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see and > > answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---