public Void seekbar()
{
total=(TextView)findViewById(R.id.total);
seekbar=(SeekBar)findViewById(R.id.seekBar);
total.setText("Covered :" +seekbar.getProgress() +" / " +seekbar.getMax());
seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
int progress;
@Override public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
progress=i;
total.setText("Covered :" +progress +" / " +seekbar.getMax());
Toast.makeText(MainActivity.this,"on progress chnge",Toast.LENGTH_SHORT).show();
}
@Override public void onStartTrackingTouch(SeekBar seekBar) {
Toast.makeText(MainActivity.this,"on start tracking",Toast.LENGTH_SHORT).show();
}
@Override public void onStopTrackingTouch(SeekBar seekBar) {
total.setText("Covered :" +progress +" / " +seekbar.getMax());
Toast.makeText(MainActivity.this,"on stop tracking",Toast.LENGTH_SHORT).show();
}
});
}