How exactly can i save/restore this seekbar if user uses back button or 
activity is destyroyed?
I have not been able to find a specific example anywhere


public class MainActivity extends Activity  implements 
SeekBar.OnSeekBarChangeListener {

    SeekBar seekBar;
    SeekBar seekBar1;
    TextView textView;
    TextView textView1;
    TextView textView2;
    TextView textView3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        seekBar=(SeekBar)findViewById(R.id.seekbar);
        seekBar1=(SeekBar)findViewById(R.id.seekBar1);
        textView=(TextView)findViewById(R.id.textview);
        textView1=(TextView)findViewById(R.id.textView1);
        textView2=(TextView)findViewById(R.id.textView2);
        textView3=(TextView)findViewById(R.id.textView3);
       
       
        
        seekBar.setOnSeekBarChangeListener(this);
        
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int progress,
            boolean fromUser) {
        //  Notify that the progress level has changed.
    
        int A= (progress+250);
        textView.setText("SeekBar now at the value of:"+progress);
        textView1.setText("SeekBar now at the value of:"+A);
        

    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
        // Notify that the user has started a touch gesture.
        //textView.setText(textView.getText()+"\n"+"SeekBar Touch Started");

    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
        // Notify that the user has finished a touch gesture.
       // textView.setText(textView.getText()+"\n"+"SeekBar Touch 
Stopped");   
}
    

    
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is 
present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
    
}

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to