I need to implement a UI element that the user will use to select between two options (left and right).
Similar to a seekbar, but if the user drags all the way to one side or another, it will trigger an action depending which side was selected. If the user lets go without touching either side, the thumb knob will bounce back to the center.
I think this is a common UI element but I can’t seem to think of an example.
EDIT: A similar element would be the slider which is found on the iPhone lock screen. In my case, the thumb knob would start in the middle and could be dragged in either direction.
Does anybody know of a library that might contain this, or will I need to extend the seekbar to implement it?
I would make a subclass of a view and use onTouchEvent() and onDraw() to determine where the user is touching and draw the screen accordingly.