AI2 Component
(Version nb184)
|
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 |
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.
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.
component | component associated with view |
Implements com.google.appinventor.components.runtime.ComponentContainer.
Activity com.google.appinventor.components.runtime.Form.$context | ( | ) |
Returns the activity context (which can be retrieved from the root container - aka the form).
Implements com.google.appinventor.components.runtime.ComponentContainer.
|
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
.
Form com.google.appinventor.components.runtime.Form.$form | ( | ) |
Returns the form that ultimately contains this container.
Implements com.google.appinventor.components.runtime.ComponentContainer.
String com.google.appinventor.components.runtime.Form.AboutScreen | ( | ) |
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.
aboutScreen | content to be displayed in aboutApp |
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.
void com.google.appinventor.components.runtime.Form.AccentColor | ( | int | color | ) |
void com.google.appinventor.components.runtime.Form.ActionBar | ( | boolean | enabled | ) |
void com.google.appinventor.components.runtime.Form.addAboutInfoToMenu | ( | Menu | menu | ) |
void com.google.appinventor.components.runtime.Form.addExitButtonToMenu | ( | Menu | menu | ) |
int com.google.appinventor.components.runtime.Form.AlignHorizontal | ( | ) |
void com.google.appinventor.components.runtime.Form.AlignHorizontal | ( | int | alignment | ) |
int com.google.appinventor.components.runtime.Form.AlignVertical | ( | ) |
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
alignment |
void com.google.appinventor.components.runtime.Form.AppName | ( | String | aName | ) |
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.
permissionName | The name of the permission to request from the user. |
void com.google.appinventor.components.runtime.Form.askPermission | ( | final BulkPermissionRequest | request | ) |
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).
permission | – The requested Android Permission as a strong |
responseRequestor | – The PermissionResultHandler that takes actions based on the user provided answer. |
void com.google.appinventor.components.runtime.Form.assertPermission | ( | String | permission | ) |
int com.google.appinventor.components.runtime.Form.BackgroundColor | ( | ) |
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.
argb | background RGB color with alpha |
String com.google.appinventor.components.runtime.Form.BackgroundImage | ( | ) |
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.
path | the path of the background image |
boolean com.google.appinventor.components.runtime.Form.BackPressed | ( | ) |
void com.google.appinventor.components.runtime.Form.BlocksToolkit | ( | String | json | ) |
void com.google.appinventor.components.runtime.Form.callInitialize | ( | Object | component | ) | throws Throwable |
boolean com.google.appinventor.components.runtime.Form.canDispatchEvent | ( | Component | component, |
String | eventName | ||
) |
void com.google.appinventor.components.runtime.Form.clear | ( | ) |
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
String com.google.appinventor.components.runtime.Form.CloseScreenAnimation | ( | ) |
void com.google.appinventor.components.runtime.Form.CloseScreenAnimation | ( | String | animType | ) |
float com.google.appinventor.components.runtime.Form.compatScalingFactor | ( | ) |
void com.google.appinventor.components.runtime.Form.deleteComponent | ( | Object | component | ) |
float com.google.appinventor.components.runtime.Form.deviceDensity | ( | ) |
void com.google.appinventor.components.runtime.Form.dispatchErrorOccurredEvent | ( | final Component | component, |
final String | functionName, | ||
final int | errorNumber, | ||
final Object... | messageArgs | ||
) |
void com.google.appinventor.components.runtime.Form.dispatchErrorOccurredEventDialog | ( | final Component | component, |
final String | functionName, | ||
final int | errorNumber, | ||
final Object... | messageArgs | ||
) |
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
.
Implements com.google.appinventor.components.runtime.HandlesEventDispatching.
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.
component | the component originating the event |
eventName | the name of the event to fire |
notAlreadyHandled | true if the event was not handled by an event handler on the component, otherwise false |
args | any event-specific arguments to pass to the event handler block |
Implements com.google.appinventor.components.runtime.HandlesEventDispatching.
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.
component | The component that needs the denied permission. |
functionName | The function that triggers the denied permission. |
exception | The PermissionDenied exception |
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.
component | The component that needs the denied permission. |
functionName | The function that triggers the denied permission. |
permissionName | The name of the needed permission. |
boolean com.google.appinventor.components.runtime.Form.doesAppDeclarePermission | ( | String | permissionName | ) |
void com.google.appinventor.components.runtime.Form.dontGrabTouchEventsForComponent | ( | ) |
void com.google.appinventor.components.runtime.Form.ErrorOccurred | ( | Component | component, |
String | functionName, | ||
int | errorNumber, | ||
String | message | ||
) |
void com.google.appinventor.components.runtime.Form.ErrorOccurredDialog | ( | Component | component, |
String | functionName, | ||
int | errorNumber, | ||
String | message, | ||
String | title, | ||
String | buttonText | ||
) |
|
static |
|
static |
|
static |
|
static |
synchronized Bundle com.google.appinventor.components.runtime.Form.fullScreenVideoAction | ( | int | action, |
VideoPlayer | source, | ||
Object | data | ||
) |
Perform some action related to fullscreen video display.
|
static |
String com.google.appinventor.components.runtime.Form.getAssetPath | ( | String | asset | ) |
Gets the path to an asset.
asset | The filename of an application asset |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
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.
component | The extension that is requesting an asset |
asset | The asset filename |
FileNotFoundException | if the asset cannot be located |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
|
static |
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.
String com.google.appinventor.components.runtime.Form.getOpenAnimType | ( | ) |
|
static |
|
static |
int com.google.appinventor.components.runtime.Form.Height | ( | ) |
Returns the Screen height in pixels (y-size).
Implements com.google.appinventor.components.runtime.ComponentContainer.
void com.google.appinventor.components.runtime.Form.HideKeyboard | ( | ) |
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.
name | the name of the application icon |
void com.google.appinventor.components.runtime.Form.Initialize | ( | ) |
boolean com.google.appinventor.components.runtime.Form.isDarkTheme | ( | ) |
boolean com.google.appinventor.components.runtime.Form.isDeniedPermission | ( | String | permission | ) |
|
staticprotected |
|
protected |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
|
protected |
void com.google.appinventor.components.runtime.Form.onBackPressed | ( | ) |
void com.google.appinventor.components.runtime.Form.onConfigurationChanged | ( | Configuration | newConfig | ) |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
void com.google.appinventor.components.runtime.Form.onCreate | ( | Bundle | icicle | ) |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
Dialog com.google.appinventor.components.runtime.Form.onCreateDialog | ( | int | id | ) |
boolean com.google.appinventor.components.runtime.Form.onCreateOptionsMenu | ( | Menu | menu | ) |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
void com.google.appinventor.components.runtime.Form.onGlobalLayout | ( | ) |
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
boolean com.google.appinventor.components.runtime.Form.onOptionsItemSelected | ( | MenuItem | item | ) |
|
protected |
void com.google.appinventor.components.runtime.Form.onPrepareDialog | ( | int | id, |
Dialog | dialog | ||
) |
void com.google.appinventor.components.runtime.Form.onRequestPermissionsResult | ( | int | requestCode, |
String | permissions[], | ||
int[] | grantResults | ||
) |
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
InputStream com.google.appinventor.components.runtime.Form.openAsset | ( | String | asset | ) | throws IOException |
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.
component | The extension that is requesting an asset |
asset | The asset filename |
IOException | if the asset is not found or cannot be read |
String com.google.appinventor.components.runtime.Form.OpenScreenAnimation | ( | ) |
void com.google.appinventor.components.runtime.Form.OpenScreenAnimation | ( | String | animType | ) |
void com.google.appinventor.components.runtime.Form.OtherScreenClosed | ( | String | otherScreenName, |
Object | result | ||
) |
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.
component | The component that needs the denied permission. |
functionName | The property or method of the component that needs the denied permission. |
permissionName | The name of the permission that has been denied by the user. |
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.
permissionName | The name of the permission that was granted by the user. |
String com.google.appinventor.components.runtime.Form.Platform | ( | ) |
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.
int com.google.appinventor.components.runtime.Form.PrimaryColor | ( | ) |
void com.google.appinventor.components.runtime.Form.PrimaryColor | ( | final int | color | ) |
int com.google.appinventor.components.runtime.Form.PrimaryColorDark | ( | ) |
void com.google.appinventor.components.runtime.Form.PrimaryColorDark | ( | int | color | ) |
int com.google.appinventor.components.runtime.Form.registerForActivityResult | ( | ActivityResultListener | listener | ) |
void com.google.appinventor.components.runtime.Form.registerForActivityResult | ( | ActivityResultListener | listener, |
int | requestCode | ||
) |
void com.google.appinventor.components.runtime.Form.registerForOnClear | ( | OnClearListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnCreateOptionsMenu | ( | OnCreateOptionsMenuListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnDestroy | ( | OnDestroyListener | component | ) |
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().
component |
void com.google.appinventor.components.runtime.Form.registerForOnNewIntent | ( | OnNewIntentListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnOptionsItemSelected | ( | OnOptionsItemSelectedListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnOrientationChange | ( | OnOrientationChangeListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnPause | ( | OnPauseListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnResume | ( | OnResumeListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerForOnStop | ( | OnStopListener | component | ) |
void com.google.appinventor.components.runtime.Form.registerPercentLength | ( | AndroidViewComponent | component, |
int | length, | ||
PercentStorageRecord.Dim | dim | ||
) |
void com.google.appinventor.components.runtime.Form.runtimeFormErrorOccurredEvent | ( | String | functionName, |
int | errorNumber, | ||
String | message | ||
) |
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.
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.
screenOrientation | the screen orientation as a string |
void com.google.appinventor.components.runtime.Form.ScreenOrientationChanged | ( | ) |
boolean com.google.appinventor.components.runtime.Form.Scrollable | ( | ) |
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.
scrollable | true if the screen should be vertically scrollable |
void com.google.appinventor.components.runtime.Form.setChildHeight | ( | final AndroidViewComponent | component, |
int | height | ||
) |
void com.google.appinventor.components.runtime.Form.setChildWidth | ( | final AndroidViewComponent | component, |
int | width | ||
) |
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.
void com.google.appinventor.components.runtime.Form.ShowListsAsJson | ( | boolean | asJson | ) |
boolean com.google.appinventor.components.runtime.Form.ShowStatusBar | ( | ) |
void com.google.appinventor.components.runtime.Form.ShowStatusBar | ( | boolean | show | ) |
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.
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
|
static |
|
static |
void com.google.appinventor.components.runtime.Form.Theme | ( | String | 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; andDark
, 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.
String com.google.appinventor.components.runtime.Form.Title | ( | ) |
void com.google.appinventor.components.runtime.Form.Title | ( | String | title | ) |
boolean com.google.appinventor.components.runtime.Form.TitleVisible | ( | ) |
void com.google.appinventor.components.runtime.Form.TitleVisible | ( | boolean | show | ) |
|
protected |
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.
void com.google.appinventor.components.runtime.Form.unregisterForActivityResult | ( | ActivityResultListener | listener | ) |
void com.google.appinventor.components.runtime.Form.unregisterPercentLength | ( | AndroidViewComponent | component, |
PercentStorageRecord.Dim | dim | ||
) |
|
protected |
Reimplemented in com.google.appinventor.components.runtime.ReplForm.
void com.google.appinventor.components.runtime.Form.VersionCode | ( | int | vCode | ) |
void com.google.appinventor.components.runtime.Form.VersionName | ( | String | vName | ) |
int com.google.appinventor.components.runtime.Form.Width | ( | ) |
Returns the Screen width in pixels (x-size).
Implements com.google.appinventor.components.runtime.ComponentContainer.
|
staticprotected |
|
protected |
|
static |
|
static |
|
protected |
|
static |
|
protected |
|
protected |