Anonymous Inner Class That Implements Interface OnSeekBarChangeListener

Lines 98–120 of Fig. 3.15 create the anonymous-inner-class object named customSeekBarListener that responds to customTipSeekBar’s events. If you’re not familiar with anonymous inner classes, visit the following page:

Line 67 (Fig. 3.12) registered customSeekBarListener as customTipSeekBar’s OnSeekBarChangeListener event handler. For clarity, we define all but the simplest event-handling objects in this manner so that we do not clutter the onCreate method with this code.

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.