Time for action - listening to the SeekBar
The user interface is now populated with the default data. However, it's not interactive at all. If you drag the
SeekBar the How Many People: label will remain at its default value of 2. We need an event listener to update the label when the
SeekBar is used.
- Open the
ReviewActivityJava source in your editor or IDE.
SeekBar.OnSeekBarChangeListenerto the interfaces that
onCreate, after fetching the
findViewById, set its
SeekBar people = (SeekBar)findViewById(R.id.people); people.setOnSeekBarChangeListener(this);
- Implement the
onProgressChangedmethod to update
public void onProgressChanged( SeekBar bar, int progress, ...