I use SeekBar
for setting volume. I do the following:
- I get current volume by
getStreamVolume()
and pass it toSeekBar
element bysetProgress()
. - I listen messages from the
SeekBar
element byonStopTrackingTouch()
and set volume bysetStreamVolume()
. It works.
But user can change volume by hardware volume controls. I'd like to catch it and change SeekBar
pointer position appropriately. How can I do it?