I guess I could setfocus when the field is touched, but that feels
like I'm manually adding functionality back to the text field
(edittext) -- which leads me to ask: what other functionality is lost
by eatting the touch event? Frankly, I feel that this capture-the-
touch-event-and-eat-it approach to suppressing the soft keyboard is a
kind of hack. Is there a graceful way of suppressing the soft
keyboard?



On Jun 1, 7:38 am, Sujay Krishna Suresh <[email protected]>
wrote:
> arent u able to use setfocus to give ur keypad the focus???
>
>
>
> On Mon, Jun 1, 2009 at 8:03 PM, Alex B <[email protected]> wrote:
>
> > Anyone know how to suppress the soft keyboard?
>
> > On May 29, 8:59 am, Alex B <[email protected]> wrote:
> > > Actually, there's still a problem.
>
> > > I only want suppress the softkeyboardfrom showing up -- because I
> > > have a custom on-screen keypad. Consuming the touch event suppresses
> > > the softkeyboard, but it also holds the focus on the text field,
> > > making it impossible to touch another text field. I have two text
> > > fields, and I want to suppress thekeyboardon both, but of course
> > > both fields must still be touchable.
>
> > > Any idea how to suppress the softkeyboard, but not have the above
> > > mentioned negative side effect?
>
> > > On May 28, 11:19 pm, Alex B <[email protected]> wrote:
>
> > > > Indeed, Sujay, thank you!
>
> > > > This will disable (suppress) the softkeyboard:
>
> > > > editText_input_field.setOnTouchListener(otl);
>
> > > > private OnTouchListener otl = new OnTouchListener()
> > > > {
> > > >         public boolean onTouch (View v, MotionEvent event)
> > > >         {
> > > >                 return true; // the listener has consumed the event
> > > >         }
>
> > > > };
>
> --
> Regards,
> Sujay
> George Bernard 
> Shaw<http://www.brainyquote.com/quotes/authors/g/george_bernard_shaw.html>
> - "A government that robs Peter to pay Paul can always depend on the
> support of Paul."
--~--~---------~--~----~------------~-------~--~----~
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