Android - Create a settings object similar to volume control -
as title says, wondering if there way add way create input in android application, providing user bar similar 1 used android system adjusting sound volume. specific variable change value, according position of "button" on bar (sorry english). advice on that?
a seekbar
looking for.
here design spec: https://www.google.com/design/spec/components/sliders.html#
here reference page: http://developer.android.com/reference/android/widget/seekbar.html
if want set value of position of seekbar
, do:
seekbar.setprogress(position);
where position
want seekbar
be.
getting position of seekbar
bit more involved. firstly must set setonseekbarchangelistener
, grab seekbar
value within onprogresschanged
method. stackoverflow question answers well: get android seekbar value , display on screen
Comments
Post a Comment