Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created July 12, 2022 01:52
Show Gist options
  • Save codeforfun-jp/d071f73e375d9e3a743679de4b071d8c to your computer and use it in GitHub Desktop.
Save codeforfun-jp/d071f73e375d9e3a743679de4b071d8c to your computer and use it in GitHub Desktop.
【Kotlin】How to Use SeekBar 2
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val textView = findViewById<TextView>(R.id.textView)
val seekbar = findViewById<SeekBar>(R.id.seekbar)
val button = findViewById<Button>(R.id.button)
// 初期値を表示
textView.text = "${seekbar.progress}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment