Screen
Definition
Top-level component containing all other components in the program.
Properties
- 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. - 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
, theDatePicker
, and others. - AlignHorizontal
- A number that encodes how contents of the screen are aligned horizontally. The choices are:
1
(left aligned),3
(horizontally centered),2
(right aligned). - AlignVertical
- 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. - AppName
- 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. - BackgroundColor
- Specifies the
Screen
’s background color as an alpha-red-green-blue integer. If anBackgroundImage
has been set, the color change will not be visible until theBackgroundImage
is removed. - BackgroundImage
- Specifies the path of the
Screen
’s background image. If there is both anBackgroundImage
and aBackgroundColor
specified, only theBackgroundImage
will be visible. - BigDefaultText
- When checked, all default size text will be increased in size.
- BlocksToolkit
- A JSON string representing the subset for the screen. Authors of template apps can use this to control what components, designer properties, and blocks are available in the project.
- CloseScreenAnimation
- Sets the animation type for the transition of this form closing and returning to a form behind it in the activity stack.
- DefaultFileScope
- Specifies the default scope used when components access files. Note that the
File
component has its own property for controlling file scopes. - Height
- Returns the Screen height in pixels (y-size).
- HighContrast
- When checked, there will be high contrast mode turned on.
- Icon
- The image used for your App’s display icon should be a square png or jpeg image with dimensions up to 1024×1024 pixels. Larger images may cause compiling or installing the app to fail. The build server will generate images of standard dimensions for Android devices.
- OpenScreenAnimation
- Sets the animation type for the transition of this form opening.
- 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.
- 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.
- PrimaryColor
- This is the primary color used as part of the Android theme, including coloring the
Screen
’s title bar. - 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
Screen
’s title bar. - ScreenOrientation
- Declares the requested screen orientation, specified as a text value. Commonly used values are
landscape
,portrait
,sensor
,user
andunspecified
. See the Android developer documentation for the complete list of possible options. - 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.
- ShowListsAsJson
- If
true
(the default), lists will be shown as strings in JSON/Python notation for example [1, “a”, true]. Iffalse
, 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. - ShowStatusBar
- The status bar is the topmost bar on the screen. This property reports whether the status bar is visible.
- Sizing
- 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.
- 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 theDevice Default
theme but with black title text; andDark
, which is a dark version of theDevice Default
theme usingPrimaryColorDark
and having dark grey components.
- Title
- Title property setter method: sets a new caption for the form in the form’s title bar.
- TitleVisible
- The title bar is the top gray bar on the screen. This property reports whether the title bar is visible.
- TutorialURL
- 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.
- VersionCode
- An integer value which must be incremented each time a new Android Application Package File (APK) is created for the Google Play Store.
- VersionName
- A string which can be changed to allow Google Play Store users to distinguish between different versions of the App.
- Width
- Returns the Screen width in pixels (x-size).