eu.ensam.ii.vrpn
Class VrpnRadioButton

java.lang.Object
  extended by android.widget.RadioButton
      extended by eu.ensam.ii.vrpn.VrpnRadioButton

public class VrpnRadioButton
extends RadioButton

A RadioButton that updates a Vrpn Button channel.

The VrpnRadioButton is to be included inside a RadioGroup. The VrpnRadioButton will send a true when its state changes to checked and a false update when its state changes to unchecked. Checking another button of the RadioGroup will uncheck the RadioButton.

in a RadioGroup, it is possible to include :

In your layout, declare the following :

 <RadioGroup 
   android:id="@+id/RadioGroup01" 
   > 
   <eu.ensam.ii.vrpn.VrpnRadioButton 
     android:text="This way" 
     android:checked="true"
     app:vrpnButton="@id/VrpnButtonThisWay"     
   />
   <RadioButton
     android:text="other Way"  
     android:checked="false"
   />        
 </RadioGroup>
 

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 :


Constructor Summary
VrpnRadioButton(Context context)
           
VrpnRadioButton(Context context, AttributeSet attrs)
           
VrpnRadioButton(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
 void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VrpnRadioButton

public VrpnRadioButton(Context context)

VrpnRadioButton

public VrpnRadioButton(Context context,
                       AttributeSet attrs)

VrpnRadioButton

public VrpnRadioButton(Context context,
                       AttributeSet attrs,
                       int defStyle)
Method Detail

onCheckedChanged

public void onCheckedChanged(CompoundButton buttonView,
                             boolean isChecked)