![]() |
AI2 Component
(Version nb184)
|
Classes | |
class | SchemeInterface |
Public Member Functions | |
ReplForm () | |
void | onCreate (Bundle icicle) |
void | setFormName (String formName) |
boolean | onCreateOptionsMenu (Menu menu) |
void | addSettingsButton (Menu menu) |
void | addLogcatButton (Menu menu) |
boolean | isDirect () |
void | setIsUSBrepl () |
void | startHTTPD (boolean secure) |
boolean | isAssetsLoaded () |
void | setAssetsLoaded () |
void | loadComponents (List< String > extensionNames) |
void | Theme (String theme) |
void | sendToCompanion (String data) |
void | setWebRTCMgr (WebRTCNativeMgr mgr) |
void | evalScheme (String sexp) |
String | getAssetPath (String asset) |
String | getAssetPathForExtension (Component component, String asset) throws FileNotFoundException |
![]() | |
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 () |
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) |
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) |
InputStream | openAsset (String asset) throws IOException |
InputStream | openAssetForExtension (Component component, String asset) throws IOException |
![]() | |
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 | returnRetvals (final String retvals) |
![]() | |
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 boolean | isEmulator () |
static boolean | isClassicMode () |
static void | setClassicModeFromYail (boolean newClassicMode) |
Static Public Attributes | |
static ReplForm | topform |
![]() | |
static final String | APPINVENTOR_URL_SCHEME = "appinventor" |
static final String | ASSETS_PREFIX = "file:///android_asset/" |
static final int | MAX_PERMISSION_NONCE = 100000 |
![]() | |
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 | onResume () |
void | onStop () |
void | onDestroy () |
void | startNewForm (String nextFormName, Object startupValue) |
void | closeForm (Intent resultIntent) |
void | setResult (Object result) |
void | closeApplicationFromBlocks () |
void | onNewIntent (Intent intent) |
boolean | isRepl () |
void | updateTitle () |
![]() | |
void | onActivityResult (int requestCode, int resultCode, Intent data) |
void | onPause () |
void | $define () |
boolean | toastAllowed () |
void | maybeShowTitleBar () |
![]() | |
void | onPostCreate (Bundle savedInstanceState) |
void | onPostResume () |
void | onTitleChanged (CharSequence title, int color) |
void | setActionBarEnabled (boolean enabled) |
void | setClassicMode (boolean classic) |
void | setPrimaryColor (int color) |
void | hideTitleBar () |
void | styleTitleBar () |
void | setAppInventorTheme (Theme theme) |
Additional Inherited Members | |
![]() | |
static String | jsonEncodeForForm (Object value, String functionName) |
![]() | |
static boolean | isActionBarEnabled () |
static int | getPrimaryColor () |
![]() | |
final Handler | androidUIHandler = new Handler() |
String | formName |
String | title = "" |
String | startupValue = "" |
![]() | |
ThemeHelper | themeHelper |
![]() | |
static Form | activeForm |
Subclass of Form used by the 'stem cell apk', i.e. the Android app that allows communication via the Repl
Definition at line 62 of file ReplForm.java.
com.google.appinventor.components.runtime.ReplForm.ReplForm | ( | ) |
Definition at line 83 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.addLogcatButton | ( | Menu | menu | ) |
Definition at line 247 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.addSettingsButton | ( | Menu | menu | ) |
Definition at line 235 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 212 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 201 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.evalScheme | ( | String | sexp | ) |
Definition at line 467 of file ReplForm.java.
String com.google.appinventor.components.runtime.ReplForm.getAssetPath | ( | String | asset | ) |
Gets the path to an asset.
asset | The filename of an application asset |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 472 of file ReplForm.java.
String com.google.appinventor.components.runtime.ReplForm.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 from com.google.appinventor.components.runtime.Form.
Definition at line 477 of file ReplForm.java.
boolean com.google.appinventor.components.runtime.ReplForm.isAssetsLoaded | ( | ) |
Definition at line 391 of file ReplForm.java.
boolean com.google.appinventor.components.runtime.ReplForm.isDirect | ( | ) |
Definition at line 348 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.AppInventorCompatActivity.
Definition at line 512 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.loadComponents | ( | List< String > | extensionNames | ) |
This is a nasty hack. For loading external component's dex file so that they can be accessible for kawa to load it, when required. This assumes classloader checks class via delegation through the parent classloaders. For multiple dex files, we just cascade the classloaders in the hierarchy
Definition at line 404 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.onCreate | ( | Bundle | icicle | ) |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 122 of file ReplForm.java.
boolean com.google.appinventor.components.runtime.ReplForm.onCreateOptionsMenu | ( | Menu | menu | ) |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 226 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 177 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 266 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 167 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 172 of file ReplForm.java.
|
static |
Definition at line 449 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.sendToCompanion | ( | String | data | ) |
Definition at line 455 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.setAssetsLoaded | ( | ) |
Definition at line 395 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.setFormName | ( | String | formName | ) |
Definition at line 195 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.setIsUSBrepl | ( | ) |
Definition at line 352 of file ReplForm.java.
|
protected |
Definition at line 205 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.setWebRTCMgr | ( | WebRTCNativeMgr | mgr | ) |
Definition at line 463 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.startHTTPD | ( | boolean | secure | ) |
Definition at line 357 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 188 of file ReplForm.java.
void com.google.appinventor.components.runtime.ReplForm.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 from com.google.appinventor.components.runtime.Form.
Definition at line 443 of file ReplForm.java.
|
protected |
Reimplemented from com.google.appinventor.components.runtime.Form.
Definition at line 517 of file ReplForm.java.
|
static |
Definition at line 66 of file ReplForm.java.