Lines 102–119 implement interface OnSeekBarChangeListener
’s methods. Method onProgressChanged
is called whenever the SeekBar
’s thumb position changes. Line 107 calculates customPercent
using the method’s progress
parameter—an int
representing the SeekBar
’s thumb position. We divide this by 100.0 to get the custom percentage. Line 108 calls method updateCustom
to recalculate and display the custom tip and total.