android / android-ktx

A set of Kotlin extensions for Android app development.
https://android.github.io/android-ktx/core-ktx/
7.47k stars 562 forks source link

SeekBar individual listeners #351

Open dream-1ab opened 6 years ago

dream-1ab commented 6 years ago
        SeekBar.onSeek {
            //optional use
            onProgressChanged { seekBar, progress, fromUser ->

            }
            //optional use
            onStartTrackingTouch {

            }
            //optional use
            onStopTrackingTouch {

            }
        }
dovahkiin98 commented 6 years ago

the

button.onClick { }

isn't a big difference to be honest I've already suggested a PR for the EditText, tho now it's in TextView form. The Seekbar one is new, but maybe there can be more extensions.

JakeWharton commented 6 years ago

There's already a PR for seekbar as well. Perhaps we should codify a pattern for multi-callback listeners.