eu.ensam.ii.vrpn
Class VrpnRadioButton
java.lang.Object
android.widget.RadioButton
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 :
- a
VrpnRadiobutton
and a RadioButton
. Checking the RadioButton
will uncheck the VrpnRadioButton
that will send an update
- several
VrpnRadioButton
widgets. In this case the checked and the unchecked widgets will send updates
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 :
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
Method Summary |
void |
onCheckedChanged(CompoundButton buttonView,
boolean isChecked)
|
VrpnRadioButton
public VrpnRadioButton(Context context)
VrpnRadioButton
public VrpnRadioButton(Context context,
AttributeSet attrs)
VrpnRadioButton
public VrpnRadioButton(Context context,
AttributeSet attrs,
int defStyle)
onCheckedChanged
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked)