Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created July 12, 2022 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/881aaed4971b9d2421ef81a16474cf5e to your computer and use it in GitHub Desktop.
Save codeforfun-jp/881aaed4971b9d2421ef81a16474cf5e to your computer and use it in GitHub Desktop.
【Kotlin】How to Use SeekBar 3
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
/* 省略 */
// 「リセット」を押したら50にする
button.setOnClickListener {
seekbar.progress = 50
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment