MainActivity.kt package com.cfsuman.kotlintutorials import android.app.Activity import android.content.Context import android.media.MediaPlayer import android.os.Bundle import android.os.Handler import android.os.Looper import android.widget.* class MainActivity : Activity() { private lateinit var player: MediaPlayer private lateinit var runnable:Runnable private var handler: Handler = Handler(Looper.getMainLooper()) lateinit var seekBar:SeekBar lateinit var tvPass:TextView lateinit var tvDue:TextView override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) // get the widgets reference from XML layout val buttonStart = findViewById<Button>(R.id.buttonStart) val buttonStop = findViewById<Button>(R.id.buttonStop) seekBar = findViewById(R.id.seekBar) val tvDuration = findViewById<TextView>(R.id.tvDuration) ...
Android, .NET C#, Flutter, and Many More Programming tutorials.