How to convert milliseconds to seconds units and display them in textView?
Change the data type of counter from Long to Float or Double. Long only allows integer values.
private var counter: Float = 0.0F
...
counter = seek.progress.toFloat()


How to convert milliseconds to seconds units?
For example the seekBar values are from 100 to 1000 and I want to display the units if they are under 1000(second) as 0.1 0.2 0.3....0.9 then 1
private var counter: Long = 0

    @RequiresApi(Build.VERSION_CODES.O)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val textView = findViewById<TextView>(R.id.textView)
        val seek = findViewById<SeekBar>(R.id.seekBar)
        seek.min = 100
        seek.max = 1000
        seek.progress = 500
        counter = seek.progress.toLong()

        seek.setOnSeekBarChangeListener(
            object : SeekBar.OnSeekBarChangeListener {
                override fun onProgressChanged(
                    seekBar: SeekBar?,
                    progress: Int,
                    fromUser: Boolean
                ) {
                    counter = progress.toLong()
                    textView.text = (counter/1000).toString()

The line:
textView.text = (counter/1000).toString()
make it that if the bar is on the right side it will display 1 but then to the left it will display only 0.
and I want that on the right end it will display 1 but then when moving it to the left it will display 0.9 then 0.8 then 0.7.....0.1
I tried:
textView.text = (counter/1000).toString()
