Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## eu.ensam.ii.vrpn
Class VrpnSpinner

    java.lang.Object
      android.widget.Spinner
          eu.ensam.ii.vrpn.VrpnSpinner

    public class VrpnSpinner

extends Spinner

A `Spinner` that updates a Vrpn Analog channel.

Picking a value from the spinner will update a Vrpn Analog channel with the position of the item that was picked in the item list. On the application side, the value will be delivered as a double.

In your layout, declare the following :

     <eu.ensam.ii.vrpn.VrpnSpinner
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:prompt="@string/the_prompt"
       android:entries="@array/the_array"
       app:vrpnAnalog="@id/VrpnAnalogMySpinner"
       />

In a resource XML file located in res/values, define the prompt that will be displayed in the choice dialog, as well as the list of values to choose from.<

     <string name="the_prompt">Message displayed when the choice dialog is opened</string>
     <string-array name="the_array">
       <item>"Mars"</item>
       <item>"Venus"</item>
     </string-array>

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 :

- `app:vrpnAnalog` : the id of the Vrpn analog that will receive updated from this widget. This value can be a literal or a resource Id that can be kept in a separate Vrpn Id list

Constructor Summary
`VrpnSpinner(Context context)`
`VrpnSpinner(Context context, AttributeSet attrs)`

Method Summary
`void` | `onItemSelected( parent, View view, int position, long id)`
`void` | `onNothingSelected( arg0)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VrpnSpinner

    public VrpnSpinner(Context context)

### VrpnSpinner

    public VrpnSpinner(Context context,
                       AttributeSet attrs)

Method Detail

### onItemSelected

    public void onItemSelected( parent,
                               View view,
                               int position,
                               long id)

  See Also:
    `AdapterView.OnItemSelectedListener`

### onNothingSelected

    public void onNothingSelected( arg0)

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD