AI2 Component
(Version nb184)
|
Public Member Functions | |
Switch (ComponentContainer container) | |
int | ThumbColorActive () |
void | ThumbColorActive (int argb) |
int | ThumbColorInactive () |
void | ThumbColorInactive (int argb) |
int | TrackColorActive () |
int | TrackColorInactive () |
void | TrackColorActive (int argb) |
void | TrackColorInactive (int argb) |
boolean | On () |
void | On (boolean value) |
void | Changed () |
Public Member Functions inherited from com.google.appinventor.components.runtime.ToggleBase< CompoundButton > | |
ToggleBase (ComponentContainer container) | |
View | getView () |
void | Changed () |
void | GotFocus () |
void | LostFocus () |
void | BackgroundColor (int argb) |
int | BackgroundColor () |
void | Enabled (boolean enabled) |
boolean | Enabled () |
void | FontBold (boolean bold) |
boolean | FontBold () |
void | FontItalic (boolean italic) |
boolean | FontItalic () |
void | FontSize (float size) |
float | FontSize () |
void | FontTypeface (int typeface) |
int | FontTypeface () |
void | Text (String text) |
String | Text () |
void | TextColor (int argb) |
int | TextColor () |
void | onCheckedChanged (CompoundButton buttonView, boolean isChecked) |
void | onFocusChange (View previouslyFocused, boolean gainFocus) |
Additional Inherited Members | |
Protected Member Functions inherited from com.google.appinventor.components.runtime.ToggleBase< CompoundButton > | |
void | initToggle () |
Protected Attributes inherited from com.google.appinventor.components.runtime.ToggleBase< CompoundButton > | |
T | view |
Switch
components can detect user taps and can change their boolean state in response. They are identical to CheckBoxes except in appearance.
Switches have an on (true) state and an off (false) state. A Switch
component raises an event when the user taps it to toggle between states.
Definition at line 38 of file Switch.java.
com.google.appinventor.components.runtime.Switch.Switch | ( | ComponentContainer | container | ) |
Creates a new Switch component.
container | container, component will be placed in |
Definition at line 56 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.Changed | ( | ) |
Definition at line 219 of file Switch.java.
boolean com.google.appinventor.components.runtime.Switch.On | ( | ) |
Returns true if the type%
is on.
Definition at line 197 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.On | ( | boolean | value | ) |
True if the switch is in the On state, false otherwise.
@internaldoc Checked property setter method.
value |
Definition at line 212 of file Switch.java.
int com.google.appinventor.components.runtime.Switch.ThumbColorActive | ( | ) |
Returns the type%
's thumb color (button that toggles back and forth) when the switch is ON/Checked
Definition at line 98 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.ThumbColorActive | ( | int | argb | ) |
Specifies the type%
's thumb color when switch is in the On state.
argb | thumb RGB color with alpha |
Definition at line 110 of file Switch.java.
int com.google.appinventor.components.runtime.Switch.ThumbColorInactive | ( | ) |
Returns the type%
's thumb color (button that toggles back and forth) when the switch is Off/Unchecked
Definition at line 125 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.ThumbColorInactive | ( | int | argb | ) |
Specifies the type%
's thumb color when switch is in the Off state.
argb | thumb RGB color with alpha |
Definition at line 137 of file Switch.java.
int com.google.appinventor.components.runtime.Switch.TrackColorActive | ( | ) |
Returns the type%
's track color
Definition at line 151 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.TrackColorActive | ( | int | argb | ) |
Specifies the type%
's track color when in the On state.
argb | track RGB color with alpha |
Definition at line 167 of file Switch.java.
int com.google.appinventor.components.runtime.Switch.TrackColorInactive | ( | ) |
Definition at line 155 of file Switch.java.
void com.google.appinventor.components.runtime.Switch.TrackColorInactive | ( | int | argb | ) |
Specifies the type%
's track color when in the Off state.
argb |
Definition at line 182 of file Switch.java.