Tuesday, October 12, 2010

[android-developers] using long touch to set a seekbar

I have an app that uses seekbars with buttons on either side for fine
adjustments. Right now I use simple onclick events for the buttons,
every click changes the seekbar 1 unit.

What I would like to do is use a long press to quickly scroll, so if a
user holds down a button for say 800 millis it will start adding ten
units per second.

What I'm thinking my approach should be is to use onKeyDown and
onKeyUp events, but is there a better way? OnLongClickListener won't
work as far as I can tell because it doesn't detect key-up.

Is my approach correct?

Thanks!
-BB

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate