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 VrpnPressButton

    java.lang.Object
      android.widget.Button
          eu.ensam.ii.vrpn.VrpnPressButton

    public class VrpnPressButton

extends Button

A `Button` connected to a VRPN Button.

This button is linked to a Vrpn button. It sends sends a `true` update when its status changes to checked and a `false` update when its status changes to unchecked. The status of the VrpnPressButton changes when it is pushed, and also when it is released, unlike a `VrpnToggleButton`.

In your `res/layout.xml`, include the widget in its parent layout :

     <eu.ensam.ii.VrpnPressButton
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       app:vrpnButton="@id/MyButton"
     />

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:vrpnButton` : the id of the Vrpn button 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
`VrpnPressButton(Context context)`
`VrpnPressButton(Context context, AttributeSet attrs)`
`VrpnPressButton(Context context, AttributeSet attrs, int defStyle)`

Method Summary
`boolean` | `onTouch(View v, MotionEvent event)` Called when a touch event is dispatched to this VrpnPressButton.

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

Constructor Detail

### VrpnPressButton

    public VrpnPressButton(Context context)

### VrpnPressButton

    public VrpnPressButton(Context context,
                           AttributeSet attrs)

### VrpnPressButton

    public VrpnPressButton(Context context,
                           AttributeSet attrs,
                           int defStyle)

Method Detail

### onTouch

    public boolean onTouch(View v,
                           MotionEvent event)

  Called when a touch event is dispatched to this VrpnPressButton. This method sends a `true` update when the button is pressed and a `false` update when the button is released. when it is released. No event is send while the button is pressed.

  See Also:
    `View.OnTouchListener`

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