Application closes when I try to add a change listener to a seek bar (Android Studio, Kotlin)
I'm trying to write a simple app with a TextView and Seekbar using Android Studio and Kotlin. I want the TextView to display the current progress of the SeekBar.
I'm running into trouble when using setOnSeekBarChangeListener with my seekbar. The app crashes immediately after running the code and there are no errors.
This is what my code looks like:
val bar = findViewById(R.id.bar)
val bartext = findViewById(R.id.bartext)
bar.setOnSeekBarChangeListener(object :...