AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.Form Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.Form:
com.google.appinventor.components.runtime.AppInventorCompatActivity com.google.appinventor.components.runtime.Component com.google.appinventor.components.runtime.ComponentContainer com.google.appinventor.components.runtime.HandlesEventDispatching com.google.appinventor.components.runtime.ReplForm

Classes

class  PercentStorageRecord
 

Public Member Functions

void onCreate (Bundle icicle)
 
void onConfigurationChanged (Configuration newConfig)
 
void onGlobalLayout ()
 
void onBackPressed ()
 
boolean BackPressed ()
 
int registerForActivityResult (ActivityResultListener listener)
 
void registerForActivityResult (ActivityResultListener listener, int requestCode)
 
void unregisterForActivityResult (ActivityResultListener listener)
 
void registerPercentLength (AndroidViewComponent component, int length, PercentStorageRecord.Dim dim)
 
void unregisterPercentLength (AndroidViewComponent component, PercentStorageRecord.Dim dim)
 
void registerForOnResume (OnResumeListener component)
 
void registerForOnOrientationChange (OnOrientationChangeListener component)
 
void registerForOnInitialize (OnInitializeListener component)
 
void registerForOnNewIntent (OnNewIntentListener component)
 
void registerForOnPause (OnPauseListener component)
 
void registerForOnStop (OnStopListener component)
 
void registerForOnClear (OnClearListener component)
 
void registerForOnDestroy (OnDestroyListener component)
 
void registerForOnCreateOptionsMenu (OnCreateOptionsMenuListener component)
 
void registerForOnOptionsItemSelected (OnOptionsItemSelectedListener component)
 
Dialog onCreateDialog (int id)
 
void onPrepareDialog (int id, Dialog dialog)
 
boolean canDispatchEvent (Component component, String eventName)
 
boolean dispatchEvent (Component component, String componentName, String eventName, Object[] args)
 
void dispatchGenericEvent (Component component, String eventName, boolean notAlreadyHandled, Object[] args)
 
void Initialize ()
 
void ScreenOrientationChanged ()
 
void ErrorOccurred (Component component, String functionName, int errorNumber, String message)
 
void ErrorOccurredDialog (Component component, String functionName, int errorNumber, String message, String title, String buttonText)
 
void dispatchPermissionDeniedEvent (final Component component, final String functionName, final PermissionException exception)
 
void dispatchPermissionDeniedEvent (final Component component, final String functionName, final String permissionName)
 
void dispatchErrorOccurredEvent (final Component component, final String functionName, final int errorNumber, final Object... messageArgs)
 
void dispatchErrorOccurredEventDialog (final Component component, final String functionName, final int errorNumber, final Object... messageArgs)
 
void runtimeFormErrorOccurredEvent (String functionName, int errorNumber, String message)
 
void PermissionDenied (Component component, String functionName, String permissionName)
 
void PermissionGranted (String permissionName)
 
void AskForPermission (String permissionName)
 
boolean Scrollable ()
 
void Scrollable (boolean scrollable)
 
int BackgroundColor ()
 
void BackgroundColor (int argb)
 
String BackgroundImage ()
 
void BackgroundImage (String path)
 
String Title ()
 
void Title (String title)
 
String AboutScreen ()
 
void AboutScreen (String aboutScreen)
 
boolean TitleVisible ()
 
void TitleVisible (boolean show)
 
boolean ShowStatusBar ()
 
void ShowStatusBar (boolean show)
 
String ScreenOrientation ()
 
void ScreenOrientation (String screenOrientation)
 
void ActionBar (boolean enabled)
 
int AlignHorizontal ()
 
void AlignHorizontal (int alignment)
 
int AlignVertical ()
 
void AlignVertical (int alignment)
 
String OpenScreenAnimation ()
 
void OpenScreenAnimation (String animType)
 
String CloseScreenAnimation ()
 
void CloseScreenAnimation (String animType)
 
String getOpenAnimType ()
 
void Icon (String name)
 
void VersionCode (int vCode)
 
void VersionName (String vName)
 
void Sizing (String value)
 
void ShowListsAsJson (boolean asJson)
 
boolean ShowListsAsJson ()
 
void AppName (String aName)
 
void PrimaryColor (final int color)
 
int PrimaryColor ()
 
void PrimaryColorDark (int color)
 
int PrimaryColorDark ()
 
void AccentColor (int color)
 
int AccentColor ()
 
void Theme (String theme)
 
int Width ()
 
int Height ()
 
void TutorialURL (String url)
 
void BlocksToolkit (String json)
 
String Platform ()
 
String PlatformVersion ()
 
void OtherScreenClosed (String otherScreenName, Object result)
 
HandlesEventDispatching getDispatchDelegate ()
 
Activity $context ()
 
Form $form ()
 
void $add (AndroidViewComponent component)
 
float deviceDensity ()
 
float compatScalingFactor ()
 
void setChildWidth (final AndroidViewComponent component, int width)
 
void setChildHeight (final AndroidViewComponent component, int height)
 
boolean onCreateOptionsMenu (Menu menu)
 
void addExitButtonToMenu (Menu menu)
 
void addAboutInfoToMenu (Menu menu)
 
boolean onOptionsItemSelected (MenuItem item)
 
void clear ()
 
void deleteComponent (Object component)
 
void dontGrabTouchEventsForComponent ()
 
void callInitialize (Object component) throws Throwable
 
synchronized Bundle fullScreenVideoAction (int action, VideoPlayer source, Object data)
 
void HideKeyboard ()
 
boolean isDarkTheme ()
 
boolean isDeniedPermission (String permission)
 
void assertPermission (String permission)
 
void askPermission (final String permission, final PermissionResultHandler responseRequestor)
 
void askPermission (final BulkPermissionRequest request)
 
void onRequestPermissionsResult (int requestCode, String permissions[], int[] grantResults)
 
boolean doesAppDeclarePermission (String permissionName)
 
String getAssetPath (String asset)
 
InputStream openAsset (String asset) throws IOException
 
String getAssetPathForExtension (Component component, String asset) throws FileNotFoundException
 
InputStream openAssetForExtension (Component component, String asset) throws IOException
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
final boolean isAppCompatMode ()
 
void onSupportActionModeStarted (ActionMode actionMode)
 
void onSupportActionModeFinished (ActionMode actionMode)
 
ActionMode onWindowStartingSupportActionMode (Callback callback)
 
void setContentView (View view)
 
ActionBar getSupportActionBar ()
 

Static Public Member Functions

static void switchForm (String nextFormName)
 
static void switchFormWithStartValue (String nextFormName, Object startValue)
 
static Form getActiveForm ()
 
static String getStartText ()
 
static Object getStartValue ()
 
static void finishActivity ()
 
static void finishActivityWithResult (Object result)
 
static void finishActivityWithTextResult (String result)
 
static void finishApplication ()
 
static boolean getCompatibilityMode ()
 
- Static Public Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
static boolean isEmulator ()
 
static boolean isClassicMode ()
 
static void setClassicModeFromYail (boolean newClassicMode)
 

Static Public Attributes

static final String APPINVENTOR_URL_SCHEME = "appinventor"
 
static final String ASSETS_PREFIX = "file:///android_asset/"
 
static final int MAX_PERMISSION_NONCE = 100000
 
- Static Public Attributes inherited from com.google.appinventor.components.runtime.Component
static final String ASSET_DIRECTORY = "component"
 
static final int ALIGNMENT_NORMAL = 0
 
static final int ALIGNMENT_CENTER = 1
 
static final int ALIGNMENT_OPPOSITE = 2
 
static final int ACCELEROMETER_SENSITIVITY_WEAK = 1
 
static final int ACCELEROMETER_SENSITIVITY_MODERATE = 2
 
static final int ACCELEROMETER_SENSITIVITY_STRONG = 3
 
static final int BUTTON_SHAPE_DEFAULT = 0
 
static final int BUTTON_SHAPE_ROUNDED = 1
 
static final int BUTTON_SHAPE_RECT = 2
 
static final int BUTTON_SHAPE_OVAL = 3
 
static final int COLOR_NONE = 0x00FFFFFF
 
static final int COLOR_BLACK = 0xFF000000
 
static final int COLOR_BLUE = 0xFF0000FF
 
static final int COLOR_CYAN = 0xFF00FFFF
 
static final int COLOR_DKGRAY = 0xFF444444
 
static final int COLOR_GRAY = 0xFF888888
 
static final int COLOR_GREEN = 0xFF00FF00
 
static final int COLOR_LTGRAY = 0xFFCCCCCC
 
static final int COLOR_MAGENTA = 0xFFFF00FF
 
static final int COLOR_ORANGE = 0xFFFFC800
 
static final int COLOR_PINK = 0xFFFFAFAF
 
static final int COLOR_RED = 0xFFFF0000
 
static final int COLOR_WHITE = 0xFFFFFFFF
 
static final int COLOR_YELLOW = 0xFFFFFF00
 
static final int COLOR_DEFAULT = 0x00000000
 
static final String DEFAULT_VALUE_COLOR_NONE = "&H00FFFFFF"
 
static final String DEFAULT_VALUE_COLOR_BLACK = "&HFF000000"
 
static final String DEFAULT_VALUE_COLOR_BLUE = "&HFF0000FF"
 
static final String DEFAULT_VALUE_COLOR_CYAN = "&HFF00FFFF"
 
static final String DEFAULT_VALUE_COLOR_DKGRAY = "&HFF444444"
 
static final String DEFAULT_VALUE_COLOR_GRAY = "&HFF888888"
 
static final String DEFAULT_VALUE_COLOR_GREEN = "&HFF00FF00"
 
static final String DEFAULT_VALUE_COLOR_LTGRAY = "&HFFCCCCCC"
 
static final String DEFAULT_VALUE_COLOR_MAGENTA = "&HFFFF00FF"
 
static final String DEFAULT_VALUE_COLOR_ORANGE = "&HFFFFC800"
 
static final String DEFAULT_VALUE_COLOR_PINK = "&HFFFFAFAF"
 
static final String DEFAULT_VALUE_COLOR_RED = "&HFFFF0000"
 
static final String DEFAULT_VALUE_COLOR_WHITE = "&HFFFFFFFF"
 
static final String DEFAULT_VALUE_COLOR_YELLOW = "&HFFFFFF00"
 
static final String DEFAULT_VALUE_COLOR_DEFAULT = "&H00000000"
 
static final float FONT_DEFAULT_SIZE = 14
 
static final int LAYOUT_ORIENTATION_HORIZONTAL = ComponentConstants.LAYOUT_ORIENTATION_HORIZONTAL
 
static final int LAYOUT_ORIENTATION_VERTICAL = ComponentConstants.LAYOUT_ORIENTATION_VERTICAL
 
static final int SCALING_SCALE_PROPORTIONALLY = 0
 
static final int SCALING_SCALE_TO_FIT = 1
 
static final int TYPEFACE_DEFAULT = 0
 
static final int TYPEFACE_SANSSERIF = 1
 
static final int TYPEFACE_SERIF = 2
 
static final int TYPEFACE_MONOSPACE = 3
 
static final int LENGTH_PREFERRED = -1
 
static final int LENGTH_FILL_PARENT = -2
 
static final int LENGTH_UNKNOWN = -3
 
static final int LENGTH_PERCENT_TAG = -1000
 
static final int TOAST_LENGTH_SHORT = 0
 
static final int TOAST_LENGTH_LONG = 1
 
static final int DIRECTION_NORTH = 1
 
static final int DIRECTION_NORTHEAST = 2
 
static final int DIRECTION_EAST = 3
 
static final int DIRECTION_SOUTHEAST = 4
 
static final int DIRECTION_SOUTH = -1
 
static final int DIRECTION_SOUTHWEST = -2
 
static final int DIRECTION_WEST = -3
 
static final int DIRECTION_NORTHWEST = -4
 
static final int DIRECTION_NONE = 0
 
static final int DIRECTION_MIN = -4
 
static final int DIRECTION_MAX = 4
 
static float SLIDER_MIN_VALUE = 10
 
static float SLIDER_MAX_VALUE = 50
 
static float SLIDER_THUMB_VALUE = (SLIDER_MIN_VALUE + SLIDER_MAX_VALUE) / 2.0f
 
static final String DEFAULT_VALUE_TEXT_TO_SPEECH_COUNTRY = ""
 
static final String DEFAULT_VALUE_TEXT_TO_SPEECH_LANGUAGE = ""
 

Protected Member Functions

void onActivityResult (int requestCode, int resultCode, Intent data)
 
void onResume ()
 
void onNewIntent (Intent intent)
 
void onPause ()
 
void onStop ()
 
void onDestroy ()
 
void $define ()
 
void startNewForm (String nextFormName, Object startupValue)
 
void closeForm (Intent resultIntent)
 
void closeApplicationFromBlocks ()
 
boolean toastAllowed ()
 
void updateTitle ()
 
void maybeShowTitleBar ()
 
- Protected Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
void onPostCreate (Bundle savedInstanceState)
 
void onPostResume ()
 
void onTitleChanged (CharSequence title, int color)
 
void setActionBarEnabled (boolean enabled)
 
void setClassicMode (boolean classic)
 
void setPrimaryColor (int color)
 
boolean isRepl ()
 
void hideTitleBar ()
 
void styleTitleBar ()
 
void setAppInventorTheme (Theme theme)
 

Static Protected Member Functions

static String jsonEncodeForForm (Object value, String functionName)
 
- Static Protected Member Functions inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
static boolean isActionBarEnabled ()
 
static int getPrimaryColor ()
 

Protected Attributes

final Handler androidUIHandler = new Handler()
 
String formName
 
String title = ""
 
String startupValue = ""
 
- Protected Attributes inherited from com.google.appinventor.components.runtime.AppInventorCompatActivity
ThemeHelper themeHelper
 

Static Protected Attributes

static Form activeForm
 

Detailed Description

Top-level component containing all other components in the program.

@internaldoc Component underlying activities and UI apps, not directly accessible to Simple programmers.

This is the root container of any Android activity and also the superclass for Simple/Android UI applications.

The main form is always named "Screen1".

NOTE WELL: There are many places in the code where the name "Screen1" is directly referenced. If we ever change App Inventor to support renaming screens and Screen1 in particular, we need to make sure we find all those places and make the appropriate code changes.

Definition at line 126 of file Form.java.

Member Function Documentation

◆ $add()

void com.google.appinventor.components.runtime.Form.$add ( AndroidViewComponent  component)

Adds a component to a container.

After this method is finished executing, the given component's view must have LayoutParams, even if the component cannot be added to the container until later.

Parameters
componentcomponent associated with view

Implements com.google.appinventor.components.runtime.ComponentContainer.

Definition at line 2115 of file Form.java.

◆ $context()

Activity com.google.appinventor.components.runtime.Form.$context ( )

Returns the activity context (which can be retrieved from the root container - aka the form).

Returns
activity context

Implements com.google.appinventor.components.runtime.ComponentContainer.

Definition at line 2105 of file Form.java.

◆ $define()

void com.google.appinventor.components.runtime.Form.$define ( )
protected

Compiler-generated method to initialize and add application components to the form. We just provide an implementation here to artificially make this class concrete so that it is included in the documentation and App Inventor component definition file generated by com.google.appinventor.components.scripts.DocumentationGenerator and com.google.appinventor.components.scripts.ComponentDescriptorGenerator, respectively. The actual implementation appears in

runtime.scm

.

Definition at line 857 of file Form.java.

◆ $form()

Form com.google.appinventor.components.runtime.Form.$form ( )

Returns the form that ultimately contains this container.

Returns
form

Implements com.google.appinventor.components.runtime.ComponentContainer.

Definition at line 2110 of file Form.java.

◆ AboutScreen() [1/2]

String com.google.appinventor.components.runtime.Form.AboutScreen ( )

AboutScreen property getter method.

Returns
AboutScreen string

Definition at line 1336 of file Form.java.

◆ AboutScreen() [2/2]

void com.google.appinventor.components.runtime.Form.AboutScreen ( String  aboutScreen)

Information about the screen. It appears when "About this Application" is selected from the system menu. Use it to tell users about your app. In multiple screen apps, each screen has its own AboutScreen info.

Parameters
aboutScreencontent to be displayed in aboutApp

Definition at line 1350 of file Form.java.

◆ AccentColor() [1/2]

int com.google.appinventor.components.runtime.Form.AccentColor ( )

This is the accent color used for highlights and other user interface accents in newer versions of Android. Components affected by this property include dialogs created by the Notifier, the DatePicker, and others.

Definition at line 1884 of file Form.java.

◆ AccentColor() [2/2]

void com.google.appinventor.components.runtime.Form.AccentColor ( int  color)

Definition at line 1873 of file Form.java.

◆ ActionBar()

void com.google.appinventor.components.runtime.Form.ActionBar ( boolean  enabled)

Definition at line 1516 of file Form.java.

◆ addAboutInfoToMenu()

void com.google.appinventor.components.runtime.Form.addAboutInfoToMenu ( Menu  menu)

Definition at line 2336 of file Form.java.

◆ addExitButtonToMenu()

void com.google.appinventor.components.runtime.Form.addExitButtonToMenu ( Menu  menu)

Definition at line 2324 of file Form.java.

◆ AlignHorizontal() [1/2]

int com.google.appinventor.components.runtime.Form.AlignHorizontal ( )

Returns a number that encodes how contents of the screen are aligned horizontally. The choices are: 1 = left aligned, 2 = horizontally centered, 3 = right aligned

Definition at line 1549 of file Form.java.

◆ AlignHorizontal() [2/2]

void com.google.appinventor.components.runtime.Form.AlignHorizontal ( int  alignment)

A number that encodes how contents of the screen are aligned horizontally. The choices are: 1 (left aligned), 2 (horizontally centered), 3 (right aligned).

@internaldoc Sets the horizontal alignment for contents of the screen

Parameters
alignment

Definition at line 1565 of file Form.java.

◆ AlignVertical() [1/2]

int com.google.appinventor.components.runtime.Form.AlignVertical ( )

Returns a number that encodes how contents of the arrangement are aligned vertically. The choices are: 1 = top, 2 = vertically centered, 3 = aligned at the bottom. Vertical alignment has no effect if the screen is scrollable.

Definition at line 1587 of file Form.java.

◆ AlignVertical() [2/2]

void com.google.appinventor.components.runtime.Form.AlignVertical ( int  alignment)

A number that encodes how the contents of the arrangement are aligned vertically. The choices are: 1 (aligned at the top), 2 (vertically centered), 3 (aligned at the bottom). Vertical alignment has no effect if the screen is scrollable.

@internaldoc Sets the vertical alignment for contents of the screen

Parameters
alignment

Definition at line 1604 of file Form.java.

◆ AppName()

void com.google.appinventor.components.runtime.Form.AppName ( String  aName)

This is the display name of the installed application in the phone. If the AppName is blank, it will be set to the name of the project when the project is built.

Parameters
aNamethe display name of the installed application in the phone

Definition at line 1829 of file Form.java.

◆ AskForPermission()

void com.google.appinventor.components.runtime.Form.AskForPermission ( String  permissionName)

Ask the user to grant access to a sensitive permission, such as ACCESS_FINE_LOCATION. This block is typically used as part of a PermissionDenied(Component, String, String) event to ask for permission. If the user grants permission, the PermissionGranted(String) event will be run. If the user denies permission, the PermissionDenied(Component, String, String) event will be run.

Note: It is a best practice to only ask for permissions at the time they are needed, which App Inventor components will do when necessary. You should not use AskForPermission in your Initialize() event unless access to that permission is critical to the behavior of your app and is needed up front, such as location services for a navigation app.

Parameters
permissionNameThe name of the permission to request from the user.

Definition at line 1105 of file Form.java.

◆ askPermission() [1/2]

void com.google.appinventor.components.runtime.Form.askPermission ( final BulkPermissionRequest  request)

Evaluates the request for bulk permissions and asks the user for any ungranted permissions.

Parameters
requestthe request to evaluate

Definition at line 2658 of file Form.java.

◆ askPermission() [2/2]

void com.google.appinventor.components.runtime.Form.askPermission ( final String  permission,
final PermissionResultHandler  responseRequestor 
)

askPermission – Request the user to allow what Google claims is a "dangerous" permission.

Newer versions of Android require explicit user consent for selected permissions, even if they are declared in the Android manifest. This routine permits components (and extensions) to query the user for the required permission. The caller should provide a "PermissionResultHandler" callback to handle the returned result. The caller should not continue to perform the operation that requires the new permission directly. Instead the operation needs to be continued in the PermissionResultHandler if the permission is granted (and should do something reasonable if it is not).

Parameters
permission– The requested Android Permission as a strong
responseRequestor– The PermissionResultHandler that takes actions based on the user provided answer.

Definition at line 2633 of file Form.java.

◆ assertPermission()

void com.google.appinventor.components.runtime.Form.assertPermission ( String  permission)

Test whether the permission is denied by the user and throws a PermissionException if it has.

Parameters
permissionThe name of the permission to assert.
Exceptions
PermissionExceptionif the permission is denied

Definition at line 2607 of file Form.java.

◆ BackgroundColor() [1/2]

int com.google.appinventor.components.runtime.Form.BackgroundColor ( )

BackgroundColor property getter method.

Returns
background RGB color with alpha

Definition at line 1232 of file Form.java.

◆ BackgroundColor() [2/2]

void com.google.appinventor.components.runtime.Form.BackgroundColor ( int  argb)

Specifies the type%'s background color as an alpha-red-green-blue integer. If an BackgroundImage(String) has been set, the color change will not be visible until the BackgroundImage(String) is removed.

Parameters
argbbackground RGB color with alpha

Definition at line 1246 of file Form.java.

◆ BackgroundImage() [1/2]

String com.google.appinventor.components.runtime.Form.BackgroundImage ( )

Returns the path of the background image.

Returns
the path of the background image

Definition at line 1265 of file Form.java.

◆ BackgroundImage() [2/2]

void com.google.appinventor.components.runtime.Form.BackgroundImage ( String  path)

Specifies the path of the type%'s background image. If there is both an BackgroundImage and a BackgroundColor() specified, only the BackgroundImage will be visible.

@internaldoc See MediaUtil#determineMediaSource for information about what a path can be.

Parameters
paththe path of the background image

Definition at line 1285 of file Form.java.

◆ BackPressed()

boolean com.google.appinventor.components.runtime.Form.BackPressed ( )

Definition at line 578 of file Form.java.

◆ BlocksToolkit()

void com.google.appinventor.components.runtime.Form.BlocksToolkit ( String  json)

Definition at line 1975 of file Form.java.

◆ callInitialize()

void com.google.appinventor.components.runtime.Form.callInitialize ( Object  component) throws Throwable

Definition at line 2483 of file Form.java.

◆ canDispatchEvent()

boolean com.google.appinventor.components.runtime.Form.canDispatchEvent ( Component  component,
String  eventName 
)

◆ clear()

void com.google.appinventor.components.runtime.Form.clear ( )

Definition at line 2397 of file Form.java.

◆ closeApplicationFromBlocks()

void com.google.appinventor.components.runtime.Form.closeApplicationFromBlocks ( )
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2278 of file Form.java.

◆ closeForm()

void com.google.appinventor.components.runtime.Form.closeForm ( Intent  resultIntent)
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2261 of file Form.java.

◆ CloseScreenAnimation() [1/2]

String com.google.appinventor.components.runtime.Form.CloseScreenAnimation ( )

The animation for closing current screen and returning to the previous screen. Valid options are default, fade, zoom, slidehorizontal, slidevertical, and none.

Returns
open screen animation

Definition at line 1659 of file Form.java.

◆ CloseScreenAnimation() [2/2]

void com.google.appinventor.components.runtime.Form.CloseScreenAnimation ( String  animType)

Sets the animation type for the transition of this form closing and returning to a form behind it in the activity stack.

Parameters
animTypethe type of animation to use for the transition

Definition at line 1672 of file Form.java.

◆ compatScalingFactor()

float com.google.appinventor.components.runtime.Form.compatScalingFactor ( )

Definition at line 2123 of file Form.java.

◆ deleteComponent()

void com.google.appinventor.components.runtime.Form.deleteComponent ( Object  component)

Definition at line 2427 of file Form.java.

◆ deviceDensity()

float com.google.appinventor.components.runtime.Form.deviceDensity ( )

Definition at line 2119 of file Form.java.

◆ dispatchErrorOccurredEvent()

void com.google.appinventor.components.runtime.Form.dispatchErrorOccurredEvent ( final Component  component,
final String  functionName,
final int  errorNumber,
final Object...  messageArgs 
)

◆ dispatchErrorOccurredEventDialog()

void com.google.appinventor.components.runtime.Form.dispatchErrorOccurredEventDialog ( final Component  component,
final String  functionName,
final int  errorNumber,
final Object...  messageArgs 
)

Definition at line 1026 of file Form.java.

◆ dispatchEvent()

boolean com.google.appinventor.components.runtime.Form.dispatchEvent ( Component  component,
String  componentName,
String  eventName,
Object[]  args 
)

A trivial implementation to artificially make this class concrete so that it is included in the documentation and App Inventor component definition file generated by com.google.appinventor.components.scripts.DocumentationGenerator and com.google.appinventor.components.scripts.ComponentDescriptorGenerator, respectively. The actual implementation appears in

runtime.scm

.

Implements com.google.appinventor.components.runtime.HandlesEventDispatching.

Definition at line 886 of file Form.java.

◆ dispatchGenericEvent()

void com.google.appinventor.components.runtime.Form.dispatchGenericEvent ( Component  component,
String  eventName,
boolean  notAlreadyHandled,
Object[]  args 
)

Request that the entity that handles the event send a generic event for corresponding component class, event name pair.

Parameters
componentthe component originating the event
eventNamethe name of the event to fire
notAlreadyHandledtrue if the event was not handled by an event handler on the component, otherwise false
argsany event-specific arguments to pass to the event handler block

Implements com.google.appinventor.components.runtime.HandlesEventDispatching.

Definition at line 892 of file Form.java.

◆ dispatchPermissionDeniedEvent() [1/2]

void com.google.appinventor.components.runtime.Form.dispatchPermissionDeniedEvent ( final Component  component,
final String  functionName,
final PermissionException  exception 
)

Schedules a run of the PermissionDenied event handler for after the current stack of blocks finishes executing on the UI thread.

Parameters
componentThe component that needs the denied permission.
functionNameThe function that triggers the denied permission.
exceptionThe PermissionDenied exception

Definition at line 987 of file Form.java.

◆ dispatchPermissionDeniedEvent() [2/2]

void com.google.appinventor.components.runtime.Form.dispatchPermissionDeniedEvent ( final Component  component,
final String  functionName,
final String  permissionName 
)

Schedules a run of the PermissionDenied event handler for after the current stack of blocks finishes executing on the UI thread.

Parameters
componentThe component that needs the denied permission.
functionNameThe function that triggers the denied permission.
permissionNameThe name of the needed permission.

Definition at line 1001 of file Form.java.

◆ doesAppDeclarePermission()

boolean com.google.appinventor.components.runtime.Form.doesAppDeclarePermission ( String  permissionName)

Tests whether the app declares the given permission.

Parameters
permissionNameThe name of the permission to test.
See also
android.Manifest.permission
Returns
True if the permission is declared in the manifest, otherwise false.

Definition at line 2730 of file Form.java.

◆ dontGrabTouchEventsForComponent()

void com.google.appinventor.components.runtime.Form.dontGrabTouchEventsForComponent ( )

Definition at line 2460 of file Form.java.

◆ ErrorOccurred()

void com.google.appinventor.components.runtime.Form.ErrorOccurred ( Component  component,
String  functionName,
int  errorNumber,
String  message 
)

Definition at line 940 of file Form.java.

◆ ErrorOccurredDialog()

void com.google.appinventor.components.runtime.Form.ErrorOccurredDialog ( Component  component,
String  functionName,
int  errorNumber,
String  message,
String  title,
String  buttonText 
)

Definition at line 960 of file Form.java.

◆ finishActivity()

static void com.google.appinventor.components.runtime.Form.finishActivity ( )
static

Closes the current screen, as opposed to finishApplication, which exits the entire application.

Definition at line 2224 of file Form.java.

◆ finishActivityWithResult()

static void com.google.appinventor.components.runtime.Form.finishActivityWithResult ( Object  result)
static

Definition at line 2233 of file Form.java.

◆ finishActivityWithTextResult()

static void com.google.appinventor.components.runtime.Form.finishActivityWithTextResult ( String  result)
static

Definition at line 2250 of file Form.java.

◆ finishApplication()

static void com.google.appinventor.components.runtime.Form.finishApplication ( )
static

Definition at line 2270 of file Form.java.

◆ fullScreenVideoAction()

◆ getActiveForm()

static Form com.google.appinventor.components.runtime.Form.getActiveForm ( )
static

Definition at line 2181 of file Form.java.

◆ getAssetPath()

String com.google.appinventor.components.runtime.Form.getAssetPath ( String  asset)

Gets the path to an asset.

Parameters
assetThe filename of an application asset
Returns
A file: URI to the asset

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2740 of file Form.java.

◆ getAssetPathForExtension()

String com.google.appinventor.components.runtime.Form.getAssetPathForExtension ( Component  component,
String  asset 
) throws FileNotFoundException

Determines a WebView compatible, REPL-sensitive path for an asset provided by a given extension.

Parameters
componentThe extension that is requesting an asset
assetThe asset filename
Returns
A string containing the path to the asset
Exceptions
FileNotFoundExceptionif the asset cannot be located

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2765 of file Form.java.

◆ getCompatibilityMode()

static boolean com.google.appinventor.components.runtime.Form.getCompatibilityMode ( )
static

Definition at line 2554 of file Form.java.

◆ getDispatchDelegate()

HandlesEventDispatching com.google.appinventor.components.runtime.Form.getDispatchDelegate ( )

Returns the dispatch delegate that is responsible for dispatching events for this component.

Implements com.google.appinventor.components.runtime.Component.

Definition at line 2098 of file Form.java.

◆ getOpenAnimType()

String com.google.appinventor.components.runtime.Form.getOpenAnimType ( )

Definition at line 1687 of file Form.java.

◆ getStartText()

static String com.google.appinventor.components.runtime.Form.getStartText ( )
static

Returns the string that was passed to this screen when it was opened

Returns
StartupText

Definition at line 2192 of file Form.java.

◆ getStartValue()

static Object com.google.appinventor.components.runtime.Form.getStartValue ( )
static

Returns the value that was passed to this screen when it was opened

Returns
StartValue

Definition at line 2210 of file Form.java.

◆ Height()

int com.google.appinventor.components.runtime.Form.Height ( )

Returns the Screen height in pixels (y-size).

Returns
height property used by the layout

Implements com.google.appinventor.components.runtime.ComponentContainer.

Definition at line 1948 of file Form.java.

◆ HideKeyboard()

void com.google.appinventor.components.runtime.Form.HideKeyboard ( )

Hide the soft keyboard

Definition at line 2562 of file Form.java.

◆ Icon()

void com.google.appinventor.components.runtime.Form.Icon ( String  name)

The image used for your App's display icon should be a square png or jpeg image with dimensions up to 1024x1024 pixels. Larger images may cause compiling or installing the app to fail. The build server will generate images of standard dimensions for Android devices.

Parameters
namethe name of the application icon

Definition at line 1701 of file Form.java.

◆ Initialize()

void com.google.appinventor.components.runtime.Form.Initialize ( )

Definition at line 899 of file Form.java.

◆ isDarkTheme()

boolean com.google.appinventor.components.runtime.Form.isDarkTheme ( )

Definition at line 2584 of file Form.java.

◆ isDeniedPermission()

boolean com.google.appinventor.components.runtime.Form.isDeniedPermission ( String  permission)

Test whether the permission is denied by the user.

Parameters
permissionThe name of the permission to test.
Returns
true if the permission has been denied, otherwise false.

Definition at line 2596 of file Form.java.

◆ jsonEncodeForForm()

static String com.google.appinventor.components.runtime.Form.jsonEncodeForForm ( Object  value,
String  functionName 
)
staticprotected

Definition at line 2070 of file Form.java.

◆ maybeShowTitleBar()

void com.google.appinventor.components.runtime.Form.maybeShowTitleBar ( )
protected

◆ onActivityResult()

void com.google.appinventor.components.runtime.Form.onActivityResult ( int  requestCode,
int  resultCode,
Intent  data 
)
protected

Definition at line 588 of file Form.java.

◆ onBackPressed()

void com.google.appinventor.components.runtime.Form.onBackPressed ( )

Definition at line 570 of file Form.java.

◆ onConfigurationChanged()

void com.google.appinventor.components.runtime.Form.onConfigurationChanged ( Configuration  newConfig)

◆ onCreate()

void com.google.appinventor.components.runtime.Form.onCreate ( Bundle  icicle)

◆ onCreateDialog()

Dialog com.google.appinventor.components.runtime.Form.onCreateDialog ( int  id)

Definition at line 829 of file Form.java.

◆ onCreateOptionsMenu()

boolean com.google.appinventor.components.runtime.Form.onCreateOptionsMenu ( Menu  menu)

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2310 of file Form.java.

◆ onDestroy()

void com.google.appinventor.components.runtime.Form.onDestroy ( )
protected

◆ onGlobalLayout()

void com.google.appinventor.components.runtime.Form.onGlobalLayout ( )

Definition at line 536 of file Form.java.

◆ onNewIntent()

void com.google.appinventor.components.runtime.Form.onNewIntent ( Intent  intent)
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 759 of file Form.java.

◆ onOptionsItemSelected()

boolean com.google.appinventor.components.runtime.Form.onOptionsItemSelected ( MenuItem  item)

Definition at line 2349 of file Form.java.

◆ onPause()

void com.google.appinventor.components.runtime.Form.onPause ( )
protected

Definition at line 772 of file Form.java.

◆ onPrepareDialog()

void com.google.appinventor.components.runtime.Form.onPrepareDialog ( int  id,
Dialog  dialog 
)

Definition at line 838 of file Form.java.

◆ onRequestPermissionsResult()

void com.google.appinventor.components.runtime.Form.onRequestPermissionsResult ( int  requestCode,
String  permissions[],
int[]  grantResults 
)

Definition at line 2701 of file Form.java.

◆ onResume()

void com.google.appinventor.components.runtime.Form.onResume ( )
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 723 of file Form.java.

◆ onStop()

void com.google.appinventor.components.runtime.Form.onStop ( )
protected

◆ openAsset()

InputStream com.google.appinventor.components.runtime.Form.openAsset ( String  asset) throws IOException

Opens an application asset.

Parameters
assetThe filename of an application asset
Returns
An open InputStream to the asset
Exceptions
IOExceptionif the asset cannot be opened, e.g., if it is not bundled in the app

Definition at line 2752 of file Form.java.

◆ openAssetForExtension()

InputStream com.google.appinventor.components.runtime.Form.openAssetForExtension ( Component  component,
String  asset 
) throws IOException

Opens an asset for reading as an InputStream. If the asset cannot be found, an IOException will be raised.

Parameters
componentThe extension that is requesting an asset
assetThe asset filename
Returns
A new input stream for the requested asset. The caller is responsible for closing the stream to prevent resource leaking.
Exceptions
IOExceptionif the asset is not found or cannot be read

Definition at line 2781 of file Form.java.

◆ OpenScreenAnimation() [1/2]

String com.google.appinventor.components.runtime.Form.OpenScreenAnimation ( )

Returns the type of open screen animation (default, fade, zoom, slidehorizontal, slidevertical and none).

Returns
open screen animation

Definition at line 1625 of file Form.java.

◆ OpenScreenAnimation() [2/2]

void com.google.appinventor.components.runtime.Form.OpenScreenAnimation ( String  animType)

The animation for switching to another screen. Valid options are default, fade, zoom, slidehorizontal, slidevertical, and none.

Parameters
animTypethe type of animation to use for the transition

Definition at line 1638 of file Form.java.

◆ OtherScreenClosed()

void com.google.appinventor.components.runtime.Form.OtherScreenClosed ( String  otherScreenName,
Object  result 
)

Definition at line 2088 of file Form.java.

◆ PermissionDenied()

void com.google.appinventor.components.runtime.Form.PermissionDenied ( Component  component,
String  functionName,
String  permissionName 
)

Event to handle when the app user has denied a needed permission.

Parameters
componentThe component that needs the denied permission.
functionNameThe property or method of the component that needs the denied permission.
permissionNameThe name of the permission that has been denied by the user.

Definition at line 1063 of file Form.java.

◆ PermissionGranted()

void com.google.appinventor.components.runtime.Form.PermissionGranted ( String  permissionName)

Event to handle when the app user has granted a needed permission. This event is only run when permission is granted in response to the AskForPermission(String) method.

Parameters
permissionNameThe name of the permission that was granted by the user.

Definition at line 1082 of file Form.java.

◆ Platform()

String com.google.appinventor.components.runtime.Form.Platform ( )

Gets the name of the underlying platform running the app. Currently, this is the text "Android". Other platforms may be supported in the future.

Returns
The platform running the app

Definition at line 1988 of file Form.java.

◆ PlatformVersion()

String com.google.appinventor.components.runtime.Form.PlatformVersion ( )

Gets the version number of the platform running the app. This is typically a dotted version number, such as 10.0. Any value can be returned, however, so you should take care to handle unexpected data. If the platform version is unavailable, the empty text will be returned.

Returns
The version of the platform running the app

Definition at line 2001 of file Form.java.

◆ PrimaryColor() [1/2]

int com.google.appinventor.components.runtime.Form.PrimaryColor ( )

This is the primary color used as part of the Android theme, including coloring the type%'s title bar.

Definition at line 1847 of file Form.java.

◆ PrimaryColor() [2/2]

void com.google.appinventor.components.runtime.Form.PrimaryColor ( final int  color)

Definition at line 1837 of file Form.java.

◆ PrimaryColorDark() [1/2]

int com.google.appinventor.components.runtime.Form.PrimaryColorDark ( )

This is the primary color used when the Theme property is specified to be Dark. It applies to a number of elements, including the type%'s title bar.

Definition at line 1865 of file Form.java.

◆ PrimaryColorDark() [2/2]

void com.google.appinventor.components.runtime.Form.PrimaryColorDark ( int  color)

Definition at line 1855 of file Form.java.

◆ registerForActivityResult() [1/2]

int com.google.appinventor.components.runtime.Form.registerForActivityResult ( ActivityResultListener  listener)

Definition at line 638 of file Form.java.

◆ registerForActivityResult() [2/2]

void com.google.appinventor.components.runtime.Form.registerForActivityResult ( ActivityResultListener  listener,
int  requestCode 
)

Register a

listener

for the given

requestCode

. This is used to simulate broadcast receivers as a workaround for PhoneCall and Texting handlers related to initiating calls/messages.

Parameters
listenerThe object to report activity results to for the given request code

Definition at line 651 of file Form.java.

◆ registerForOnClear()

void com.google.appinventor.components.runtime.Form.registerForOnClear ( OnClearListener  component)

Definition at line 797 of file Form.java.

◆ registerForOnCreateOptionsMenu()

void com.google.appinventor.components.runtime.Form.registerForOnCreateOptionsMenu ( OnCreateOptionsMenuListener  component)

Definition at line 821 of file Form.java.

◆ registerForOnDestroy()

void com.google.appinventor.components.runtime.Form.registerForOnDestroy ( OnDestroyListener  component)

Definition at line 817 of file Form.java.

◆ registerForOnInitialize()

void com.google.appinventor.components.runtime.Form.registerForOnInitialize ( OnInitializeListener  component)

An app can register to be notified when App Inventor's Initialize block has fired. They will be called in Initialize().

Parameters
component

Definition at line 754 of file Form.java.

◆ registerForOnNewIntent()

void com.google.appinventor.components.runtime.Form.registerForOnNewIntent ( OnNewIntentListener  component)

Definition at line 767 of file Form.java.

◆ registerForOnOptionsItemSelected()

void com.google.appinventor.components.runtime.Form.registerForOnOptionsItemSelected ( OnOptionsItemSelectedListener  component)

Definition at line 825 of file Form.java.

◆ registerForOnOrientationChange()

void com.google.appinventor.components.runtime.Form.registerForOnOrientationChange ( OnOrientationChangeListener  component)

Definition at line 744 of file Form.java.

◆ registerForOnPause()

void com.google.appinventor.components.runtime.Form.registerForOnPause ( OnPauseListener  component)

Definition at line 780 of file Form.java.

◆ registerForOnResume()

void com.google.appinventor.components.runtime.Form.registerForOnResume ( OnResumeListener  component)

Definition at line 740 of file Form.java.

◆ registerForOnStop()

void com.google.appinventor.components.runtime.Form.registerForOnStop ( OnStopListener  component)

Definition at line 793 of file Form.java.

◆ registerPercentLength()

void com.google.appinventor.components.runtime.Form.registerPercentLength ( AndroidViewComponent  component,
int  length,
PercentStorageRecord.Dim  dim 
)

Definition at line 707 of file Form.java.

◆ runtimeFormErrorOccurredEvent()

void com.google.appinventor.components.runtime.Form.runtimeFormErrorOccurredEvent ( String  functionName,
int  errorNumber,
String  message 
)

Definition at line 1048 of file Form.java.

◆ ScreenOrientation() [1/2]

String com.google.appinventor.components.runtime.Form.ScreenOrientation ( )

The requested screen orientation. Commonly used values are unspecified (-1), landscape (0), portrait (1), sensor (4), and user (2). " + "See the Android developer documentation for ActivityInfo.Screen_Orientation for the " + "complete list of possible settings.

ScreenOrientation property getter method.

Returns
screen orientation

Definition at line 1434 of file Form.java.

◆ ScreenOrientation() [2/2]

void com.google.appinventor.components.runtime.Form.ScreenOrientation ( String  screenOrientation)

Declares the requested screen orientation, specified as a text value. Commonly used values are landscape, portrait, sensor, user and unspecified. See the Android developer documentation for the complete list of possible options.

Parameters
screenOrientationthe screen orientation as a string

Definition at line 1477 of file Form.java.

◆ ScreenOrientationChanged()

void com.google.appinventor.components.runtime.Form.ScreenOrientationChanged ( )

Definition at line 928 of file Form.java.

◆ Scrollable() [1/2]

boolean com.google.appinventor.components.runtime.Form.Scrollable ( )

Scrollable property getter method.

Returns
true if the screen is vertically scrollable

Definition at line 1131 of file Form.java.

◆ Scrollable() [2/2]

void com.google.appinventor.components.runtime.Form.Scrollable ( boolean  scrollable)

When checked, there will be a vertical scrollbar on the screen, and the height of the application can exceed the physical height of the device. When unchecked, the application height is constrained to the height of the device.

Parameters
scrollabletrue if the screen should be vertically scrollable

Definition at line 1145 of file Form.java.

◆ setChildHeight()

void com.google.appinventor.components.runtime.Form.setChildHeight ( final AndroidViewComponent  component,
int  height 
)

◆ setChildWidth()

void com.google.appinventor.components.runtime.Form.setChildWidth ( final AndroidViewComponent  component,
int  width 
)

◆ ShowListsAsJson() [1/2]

boolean com.google.appinventor.components.runtime.Form.ShowListsAsJson ( )

If true{:.logic.block} (the default), lists will be shown as strings in JSON/Python notation for example [1, "a", true]. If false{:.logic.block}, lists will be shown in the LISP notation, for example (1 a true).

Note: This property appears only in Screen1 and the value for Screen1 determines the behavior for all screens in the app.

Definition at line 1814 of file Form.java.

◆ ShowListsAsJson() [2/2]

void com.google.appinventor.components.runtime.Form.ShowListsAsJson ( boolean  asJson)

ShowListsAsJson Property Setter This only appears in the designer for screen 1

Parameters

Definition at line 1801 of file Form.java.

◆ ShowStatusBar() [1/2]

boolean com.google.appinventor.components.runtime.Form.ShowStatusBar ( )

ShowStatusBar property getter method.

Returns
showStatusBar boolean

Definition at line 1392 of file Form.java.

◆ ShowStatusBar() [2/2]

void com.google.appinventor.components.runtime.Form.ShowStatusBar ( boolean  show)

The status bar is the topmost bar on the screen. This property reports whether the status bar is visible.

Parameters
showboolean

Definition at line 1405 of file Form.java.

◆ Sizing()

void com.google.appinventor.components.runtime.Form.Sizing ( String  value)

If set to responsive (the default), screen layouts will use the actual resolution of the device. See the documentation on responsive design in App Inventor for more information. If set to fixed, screen layouts will be created for a single fixed-size screen and autoscaled.

Note: This property appears on Screen1 only and controls the sizing for all screens in the app.

Definition at line 1752 of file Form.java.

◆ startNewForm()

void com.google.appinventor.components.runtime.Form.startNewForm ( String  nextFormName,
Object  startupValue 
)
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2037 of file Form.java.

◆ switchForm()

static void com.google.appinventor.components.runtime.Form.switchForm ( String  nextFormName)
static

Display a new form.

Parameters
nextFormNamethe name of the new form to display

Definition at line 2011 of file Form.java.

◆ switchFormWithStartValue()

static void com.google.appinventor.components.runtime.Form.switchFormWithStartValue ( String  nextFormName,
Object  startValue 
)
static

Display a new form and pass a startup value to the new form.

Parameters
nextFormNamethe name of the new form to display
startValuethe start value to pass to the new form

Definition at line 2027 of file Form.java.

◆ Theme()

Selects the theme for the application. Theme can only be set at compile time and the Companion will approximate changes during live development. Possible options are:

  • Classic, which is the same as older versions of App Inventor;
  • Device Default, which gives the same theme as the version of Android running on the device and uses PrimaryColor for the Action Bar and has light buttons;
  • Black Title Text, which is the Device Default theme but with black title text; and
  • Dark, which is a dark version of the Device Default theme using PrimaryColorDark and having dark grey components.

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 1902 of file Form.java.

◆ Title() [1/2]

String com.google.appinventor.components.runtime.Form.Title ( )

Title property getter method.

Returns
form caption

Definition at line 1304 of file Form.java.

◆ Title() [2/2]

void com.google.appinventor.components.runtime.Form.Title ( String  title)

Title property setter method: sets a new caption for the form in the form's title bar.

Parameters
titlenew form caption

Definition at line 1317 of file Form.java.

◆ TitleVisible() [1/2]

boolean com.google.appinventor.components.runtime.Form.TitleVisible ( )

TitleVisible property getter method.

Returns
showTitle boolean

Definition at line 1361 of file Form.java.

◆ TitleVisible() [2/2]

void com.google.appinventor.components.runtime.Form.TitleVisible ( boolean  show)

The title bar is the top gray bar on the screen. This property reports whether the title bar is visible.

Parameters
showboolean

Definition at line 1374 of file Form.java.

◆ toastAllowed()

boolean com.google.appinventor.components.runtime.Form.toastAllowed ( )
protected

Definition at line 2473 of file Form.java.

◆ TutorialURL()

void com.google.appinventor.components.runtime.Form.TutorialURL ( String  url)

A URL which will be opened on the left side panel (which can be toggled once it is open). This is intended for projects that have an in-line tutorial as part of the project. For security reasons, only tutorials hosted on http://appinventor.mit.edu or linked to from our URL shortener (http://appinv.us) may be used here. Other URLs will be silently ignored.

Definition at line 1964 of file Form.java.

◆ unregisterForActivityResult()

void com.google.appinventor.components.runtime.Form.unregisterForActivityResult ( ActivityResultListener  listener)

Definition at line 660 of file Form.java.

◆ unregisterPercentLength()

void com.google.appinventor.components.runtime.Form.unregisterPercentLength ( AndroidViewComponent  component,
PercentStorageRecord.Dim  dim 
)

Definition at line 713 of file Form.java.

◆ updateTitle()

void com.google.appinventor.components.runtime.Form.updateTitle ( )
protected

Reimplemented in com.google.appinventor.components.runtime.ReplForm.

Definition at line 2571 of file Form.java.

◆ VersionCode()

void com.google.appinventor.components.runtime.Form.VersionCode ( int  vCode)

An integer value which must be incremented each time a new Android Application Package File (APK) is created for the Google Play Store.

Parameters
vCodethe version name of the application

Definition at line 1716 of file Form.java.

◆ VersionName()

void com.google.appinventor.components.runtime.Form.VersionName ( String  vName)

A string which can be changed to allow Google Play Store users to distinguish between different versions of the App.

Parameters
vNamethe version name of the application

Definition at line 1731 of file Form.java.

◆ Width()

int com.google.appinventor.components.runtime.Form.Width ( )

Returns the Screen width in pixels (x-size).

Returns
width property used by the layout

Implements com.google.appinventor.components.runtime.ComponentContainer.

Definition at line 1936 of file Form.java.

Member Data Documentation

◆ activeForm

Form com.google.appinventor.components.runtime.Form.activeForm
staticprotected

Definition at line 152 of file Form.java.

◆ androidUIHandler

final Handler com.google.appinventor.components.runtime.Form.androidUIHandler = new Handler()
protected

Definition at line 160 of file Form.java.

◆ APPINVENTOR_URL_SCHEME

final String com.google.appinventor.components.runtime.Form.APPINVENTOR_URL_SCHEME = "appinventor"
static

Definition at line 136 of file Form.java.

◆ ASSETS_PREFIX

final String com.google.appinventor.components.runtime.Form.ASSETS_PREFIX = "file:///android_asset/"
static

Definition at line 138 of file Form.java.

◆ formName

String com.google.appinventor.components.runtime.Form.formName
protected

Definition at line 162 of file Form.java.

◆ MAX_PERMISSION_NONCE

final int com.google.appinventor.components.runtime.Form.MAX_PERMISSION_NONCE = 100000
static

Definition at line 262 of file Form.java.

◆ startupValue

String com.google.appinventor.components.runtime.Form.startupValue = ""
protected

Definition at line 238 of file Form.java.

◆ title

String com.google.appinventor.components.runtime.Form.title = ""
protected

Definition at line 177 of file Form.java.


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