The Google Glass Explorer Edition SDK is deprecated. This documentation is no longer being maintained. If you're interested in developing Glass solutions for enterprise clients, visit the Google Glass Enterprise Edition developer documentation.

Slider.Scroller

Added in API level XE22

A scroll slider that indicates the current position within a fixed-size collection. The slider hides automatically after a short time of inactivity.

Sample usage:

 Scroller slider = Slider.from(view).startScroller(10, 0);
 ....
   slider.setPosition(p);  // slide through p in [0,10]
 ....
 

Public Methods
abstract int
getMax()
abstract float
abstract void
hide()
abstract void
setPosition(float position)
abstract void
show()

Public Methods

Added in API level XE22

public abstract int getMax ()

Returns maximum value for position.

Added in API level XE22

public abstract float getPosition ()

Returns current position.

Added in API level XE22

public abstract void hide ()

Hides the slider, if not hidden already.

Added in API level XE22

public abstract void setPosition (float position)

Sets the position, typically in the range 0 and getMax(). Brings the slider back into view if hidden. Values that fall outside this range (viz. position < 0 or position > getMax()) may be used for a tugging effect.

Added in API level XE22

public abstract void show ()

Shows the slider, if not visible already. The slider hides automatically after a short time of inactivity.