My apologies for resurrecting this thread, but is it possible now to
not display the soft keyboard when the EditText view receives an on
touch event?

I've looked at IMM code and the closest thing I can find for doing
such a thing is hideSoftInputFromWindow(IBinder windowToken) but I'm
not too sure how to call it.

"Request to hide the soft input window from the context of the window
that is currently accepting input.  This should be called as a result
of the user doing some actually than fairly explicitly requests to
have the input window hidden."

I've tried a couple of different things, and the only way I've been
able to hide the soft keyboard is by hacking the onTouchEvent method
the TextView class!  And of course, I don't want to do this!

On Mar 18, 1:47 pm, me tun <a...@tpg.com.au> wrote:
> One can set, android:windowSoftInputMode="stateVisible"> in the
> AndroidManifest...
>
> Cheers.
>
> On Mar 17, 2:14 pm, me tun <a...@tpg.com.au> wrote:
>
> > Thanks Dianne, I've had a quick look through the code and have seen
> > how the onTouchEvent in the TextView Class has been modified to
> > display the soft keyboard if it is both focused and touched (how
> > profound).  I've managed to get it to display by clicking a button,
> > but really I'd like it called in OnCreate I think it has something to
> > do with the focusing, not sure but I'll look into it.
>
> > On Mar 17, 1:56 pm, Dianne Hackborn <hack...@android.com> wrote:
>
> > > If you are going to use new features before these is an SDK, you will want
> > > to read through the source code java docs and the code itself to figure 
> > > out
> > > what you want to do.  In this case WindowManager.LayoutParams has new
> > > options for controlling the input method, View has new methods, and the
> > > InputMethodManager class has the start of some documentation for how these
> > > things go together.
>
> > > On Mon, Mar 16, 2009 at 3:08 PM, me tun <a...@tpg.com.au> wrote:
>
> > > > In the InputMethodManager class, there seems to be a method
> > > > showSoftInput(view) @param view: The currently focused view, which
> > > > would like to receive soft keyboard input.  I have tried calling this
> > > > as follows:
>
> > > >        InputMethodManager imm = (InputMethodManager)
> > > >                getContext().getSystemService
> > > > (Context.INPUT_METHOD_SERVICE);
> > > >        imm.showSoftInput(mTextEntry);
>
> > > > But it seems to only work with an Edit Text view, I understand it
> > > > makes little sense to do so but is there a way I can have it
> > > > permanently raised for say an image view?
>
> > > > On Mar 16, 11:03 am, me tun <a...@tpg.com.au> wrote:
> > > > > I want to permanently display the virtual keyboard in my application,
> > > > > but it seems bound by focus to an edit text field.  Is there a way
> > > > > around this?
>
> > > > > Thanks!
>
> > > --
> > > 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.  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
-~----------~----~----~----~------~----~------~--~---

Reply via email to