On Tue, Sep 29, 2009 at 4:49 AM, James Webster <[email protected]> wrote:

> That works fine, although the vibrate is noticeably lower than that when
> you type using Hero keyboard. Still, it works fine.


It is probably using the vibrator API directly with its own vibration
pattern.


> I was debating about leaving it in the OnClickListener(), as that sort of
> seemed more appropriate, it would be a notification that you had clicked the
> button, but on second thoughts it is supposed to let you know you have
> actually touched the screen, so the I'm now calling it in the ACTION_DOWN
> event caught by OnTouch(). This now emulates the feedback behaviour of the
> Hero soft keyboard.
>
> Dianne, I appreciate the UI consideration and have indeed made it optional.
>
>
> However, the docs say that although they only provide built in actions for
> the long press, it can be used for your own widgets also, so is adding it to
> my own UI button presses really such a bad thing?
>

If you are not giving feedback for a long press, I would not use it, since
that is currently the only kind of feedback it supports.  Instead just use
the vibration API directly.  This is what the standard soft keyboard does.
(We really need to add more types of feedback and move things to using this
API, but haven't had time yet.)

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