eu.ensam.ii.vrpn
Class VrpnToggleButton
java.lang.Object
android.widget.ToggleButton
eu.ensam.ii.vrpn.VrpnToggleButton
public class VrpnToggleButton
- extends ToggleButton
A ToggleButton
connected to a Vrpn Button.
This button sends a true update when its status changes to checked and false
when its status changes to unchecked. Unlike a
VrpnPressButton
, the status of this widget changes when it is
pressed, but not when it is released,
In your layout XML file, include the following into a container widget :
<eu.ensam.ii.vrpn.VrpnButton
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
Method Summary |
void |
onCheckedChanged(CompoundButton buttonView,
boolean isChecked)
|
VrpnToggleButton
public VrpnToggleButton(Context context)
VrpnToggleButton
public VrpnToggleButton(Context context,
AttributeSet attrs)
VrpnToggleButton
public VrpnToggleButton(Context context,
AttributeSet attrs,
int defStyle)
onCheckedChanged
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked)