AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.CheckBox Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.CheckBox:
com.google.appinventor.components.runtime.ToggleBase< android.widget.CheckBox >

Public Member Functions

 CheckBox (ComponentContainer container)
 
boolean Checked ()
 
void Checked (boolean value)
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.ToggleBase< android.widget.CheckBox >
 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< android.widget.CheckBox >
void initToggle ()
 
- Protected Attributes inherited from com.google.appinventor.components.runtime.ToggleBase< android.widget.CheckBox >
view
 

Detailed Description

Example of a CheckBox

CheckBox components can detect user taps and can change their boolean state in response.

A CheckBox component raises an event when the user taps it. There are many properties affecting its appearance that can be set in the Designer or Blocks Editor.

Definition at line 33 of file CheckBox.java.

Constructor & Destructor Documentation

◆ CheckBox()

com.google.appinventor.components.runtime.CheckBox.CheckBox ( ComponentContainer  container)

Creates a new CheckBox component.

Parameters
containercontainer, component will be placed in

Definition at line 40 of file CheckBox.java.

Member Function Documentation

◆ Checked() [1/2]

boolean com.google.appinventor.components.runtime.CheckBox.Checked ( )

Set to true{:.logic.block} if the box is checked, false{:.logic.block} otherwise.

Returns
true
indicates checked,
false
unchecked

Definition at line 55 of file CheckBox.java.

◆ Checked() [2/2]

void com.google.appinventor.components.runtime.CheckBox.Checked ( boolean  value)

Checked property setter method.

@suppressdoc

Parameters
value

Definition at line 68 of file CheckBox.java.


The documentation for this class was generated from the following file: