3

I'm trying to create a View with touch events to create a vibration pattern like samsung does.

enter image description here

I use CountDownTimer to start recording during 5 seconds. I want to catch ACTION_DOWN and ACTION_UP events from touch.

Are there a library to create this circle view with the timer animation? Any suggestions?

jzafrilla
  • 1,416
  • 3
  • 18
  • 41
  • Note Samsung may have licensed a library like Immersion Haptic to build out the intricate effects: http://www2.immersion.com/developers/index.php?option=com_content&view=category&layout=blog&id=110&Itemid=503 – Morrison Chang Sep 09 '15 at 15:07

2 Answers2

1

If you can keep track of the timer in something like milliseconds, you can log the action down and action up with the time.

Example: Action down @ Second 1 Action up @ Second 1.5

When you try to recreate this, you can rebuild the same way you recorded. Start a timer, and when Second = 1, vibrate. When second = 1.5, stop vibrating

apriscott
  • 26
  • 3
1

There few really amazing libraries for circle views - you can find them on Android Arsenal, under Graphics category. I think most useful for you is DecoView. This library is designed for circle animations.

Also few flexible libraries which support circle charts are EazeGraph and MPAndroidChart. Last one is really powerful.

Oleksandr
  • 6,226
  • 1
  • 46
  • 54