That means that your text field is no longer really an editor (though it may
have some stuff lying around that make it kind-of work).  If you want a tap
to not show the soft keyboard, just capture the click event on the text view
and eat it.

On Wed, May 13, 2009 at 4:25 AM, Strickidinho <[email protected]>wrote:

>
> Ok, I've found the answer myself and it was so easy.
>
> EditText.setInputType(InputType.TYPE_NULL);
>
> That's all. Or you set the inputType in the XML Attribute to none.
>
>
>
> On 12 Mai, 13:19, "[email protected]"
> <[email protected]> wrote:
> > 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 <[email protected]> wrote:
> >
> > > Thanks, it worked.
> >
> > > On Apr 29, 1:32 am, Dianne Hackborn <[email protected]> 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...()<http://developer.android.com/reference/android/view/View.html#getWind...%28%29>
> >
> > > > On Tue, Apr 28, 2009 at 12:03 PM, simon <[email protected]>
> 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
> > > > [email protected]
> >
> > > > 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.
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to