eu.ensam.ii.vrpn
Class VrpnSeekBar

java.lang.Object
  extended by android.widget.LinearLayout
      extended by eu.ensam.ii.vrpn.VrpnSeekBar

public class VrpnSeekBar
extends LinearLayout

A SeekBar that updates a Vrpn Analog channel.

The seekbar include a line with the min, max and current values of the seekbar, and the seekbar itself. The seekbar progress is converted into a value in the app:minValue .. app:maxValue range. This value is then sent out to the Vrpn Analog channel whose id is specified in the app:vrpnAnalog attribute. The VrpnSeekBar moves in increments that are one hundredth of the value range.

In your layout, declare the following (note the app:attributes)

 <eu.ensam.ii.vrpn.VrpnSeekBar 
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   app:minValue="-3"
   app:minValue="3"
   app:minValue="0" 
   app:vrpnAnalog="@id/MyVrpnAnalogId"
 />
 

The root element of the layout must declare the following line just after the xmlns:android ... line :

   xmlns:app="http://schemas.android.com/apk/res/your.package.name.here"
 

Custom XML attributes :

Author:
Philippe

Constructor Summary
VrpnSeekBar(Context context)
           
VrpnSeekBar(Context context, AttributeSet attrs)
           
 
Method Summary
 void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser)
          Called when the progress of the SeekBar changes Compute the value from the progress and send a VrpnUpdate to the analog channel that is associated to the widget with the custom attribute app:vrpnAnalog
 void onStartTrackingTouch(SeekBar seekBar)
           
 void onStopTrackingTouch(SeekBar seekBar)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VrpnSeekBar

public VrpnSeekBar(Context context)

VrpnSeekBar

public VrpnSeekBar(Context context,
                   AttributeSet attrs)
Method Detail

onProgressChanged

public void onProgressChanged(SeekBar seekBar,
                              int progress,
                              boolean fromUser)
Called when the progress of the SeekBar changes Compute the value from the progress and send a VrpnUpdate to the analog channel that is associated to the widget with the custom attribute app:vrpnAnalog


onStartTrackingTouch

public void onStartTrackingTouch(SeekBar seekBar)

onStopTrackingTouch

public void onStopTrackingTouch(SeekBar seekBar)