Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created July 12, 2022 06:13
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/0ea768d08873fba149395c4e57875130 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/0ea768d08873fba149395c4e57875130 to your computer and use it in GitHub Desktop.
【Java】How to Use SeekBar 2
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView textView = findViewById(R.id.textView);
SeekBar seekbar = findViewById(R.id.seekbar);
Button button = findViewById(R.id.button);
// 初期値を表示
textView.setText(seekbar.getProgress() + "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment