Take the 2-minute tour ×

On the start of the activity I have set the progress to 8 ;
so the thumb is on 8 but the background is not on 8 , After changing the seekbar it working fine but on start of the activity it's not...

unable to load image

Thanks in advance...

Code is:-

public static int time=8;

SeekBar sb=(SeekBar)findViewById(R.id.SB);
TextView tv=(TextView)findViewById(R.id.tv);
sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        public void onStopTrackingTouch(SeekBar seekBar) {
            // TODO Auto-generated method stub


        public void onStartTrackingTouch(SeekBar seekBar) {
            // TODO Auto-generated method stub


        public void onProgressChanged(SeekBar seekBar, int progress,
                boolean fromUser) {
            // TODO Auto-generated method stub
share|improve this question
don't you think showing your code would be a bit helpful here? –  Alex Lockwood Jul 7 '12 at 17:55
add comment

1 Answer

up vote 1 down vote accepted

Try to set the max value first. Then try to set the progress.

share|improve this answer
Ya it worked..@Alex thankss –  pOSEID0n Jul 8 '12 at 7:52
add comment

Your Answer


